1# Copyright (c) 2022-2025 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5 6# http://www.apache.org/licenses/LICENSE-2.0 7 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("../../../../appexecfwk.gni") 16 17ohos_shared_library("launcherbundlemanager_common") { 18 sanitize = { 19 boundary_sanitize = true 20 cfi = true 21 cfi_cross_dso = true 22 debug = false 23 integer_overflow = true 24 ubsan = true 25 } 26 27 defines = [ 28 "APP_LOG_TAG = \"BMS\"", 29 "LOG_DOMAIN = 0xD001120", 30 ] 31 32 cflags = [ 33 "-Os", 34 "-fstack-protector-strong", 35 ] 36 37 cflags_cc = [ 38 "-Os", 39 "-fstack-protector-strong", 40 ] 41 42 sources = [ "js_launcher_service.cpp" ] 43 44 deps = [ 45 "${base_path}:appexecfwk_base", 46 "${common_path}:libappexecfwk_common", 47 "${core_path}:appexecfwk_core", 48 "../common:bundle_napi_common", 49 ] 50 51 external_deps = [ 52 "ability_base:want", 53 "ability_runtime:ability_manager", 54 "ability_runtime:ability_start_options", 55 "ability_runtime:napi_common", 56 "c_utils:utils", 57 "common_event_service:cesfwk_core", 58 "common_event_service:cesfwk_innerkits", 59 "hilog:libhilog", 60 "ipc:ipc_single", 61 "napi:ace_napi", 62 ] 63 subsystem_name = "bundlemanager" 64 part_name = "bundle_framework" 65} 66 67ohos_shared_library("launcherbundlemanager") { 68 branch_protector_ret = "pac_ret" 69 70 sanitize = { 71 boundary_sanitize = true 72 cfi = true 73 cfi_cross_dso = true 74 debug = false 75 integer_overflow = true 76 ubsan = true 77 } 78 79 include_dirs = [ "${kits_path}/js/common" ] 80 defines = [ 81 "APP_LOG_TAG = \"BMS\"", 82 "LOG_DOMAIN = 0xD001120", 83 ] 84 85 cflags = [ 86 "-Os", 87 "-fstack-protector-strong", 88 ] 89 90 cflags_cc = [ 91 "-Os", 92 "-fstack-protector-strong", 93 ] 94 95 sources = [ "native_module.cpp" ] 96 97 if (bundle_framework_launcher) { 98 sources += [ "launcher_bundle_manager.cpp" ] 99 } else { 100 sources += [ "launcher_bundle_manager_unsupported.cpp" ] 101 } 102 103 deps = [ 104 "${base_path}:appexecfwk_base", 105 "${common_path}:libappexecfwk_common", 106 "${core_path}:appexecfwk_core", 107 "../common:bundle_napi_common", 108 ] 109 110 if (bundle_framework_launcher) { 111 deps += [ ":launcherbundlemanager_common" ] 112 } 113 114 external_deps = [ 115 "ability_base:want", 116 "ability_runtime:ability_manager", 117 "ability_runtime:ability_start_options", 118 "ability_runtime:napi_common", 119 "ability_runtime:runtime", 120 "c_utils:utils", 121 "common_event_service:cesfwk_core", 122 "common_event_service:cesfwk_innerkits", 123 "eventhandler:libeventhandler", 124 "hilog:libhilog", 125 "ipc:ipc_single", 126 "napi:ace_napi", 127 "samgr:samgr_proxy", 128 "window_manager:libwm", 129 ] 130 relative_install_dir = "module/bundle" 131 subsystem_name = "bundlemanager" 132 part_name = "bundle_framework" 133} 134