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("../../../../dbms.gni") 16 17ohos_shared_library("distributed_bundle_common") { 18 branch_protector_ret = "pac_ret" 19 20 sanitize = { 21 boundary_sanitize = true 22 cfi = true 23 cfi_cross_dso = true 24 debug = false 25 integer_overflow = true 26 ubsan = true 27 } 28 29 sources = [ "distributed_helper.cpp" ] 30 31 cflags = [ 32 "-Os", 33 "-fstack-protector-strong", 34 ] 35 36 cflags_cc = [ 37 "-Os", 38 "-fstack-protector-strong", 39 ] 40 41 deps = [ "${dbms_inner_api_path}:dbms_fwk" ] 42 43 defines = [ 44 "APP_LOG_TAG = \"DistributedBundleMgrService\"", 45 "LOG_DOMAIN = 0xD0011E0", 46 ] 47 48 external_deps = [ 49 "bundle_framework:appexecfwk_base", 50 "bundle_framework:appexecfwk_core", 51 "bundle_framework:bundle_napi_common", 52 "bundle_framework:libappexecfwk_common", 53 "c_utils:utils", 54 "hilog:libhilog", 55 "ipc:ipc_core", 56 "napi:ace_napi", 57 "samgr:samgr_proxy", 58 ] 59 60 subsystem_name = "bundlemanager" 61 part_name = "distributed_bundle_framework" 62} 63 64ohos_shared_library("distributedbundlemanager") { 65 branch_protector_ret = "pac_ret" 66 67 sanitize = { 68 boundary_sanitize = true 69 cfi = true 70 cfi_cross_dso = true 71 debug = false 72 integer_overflow = true 73 ubsan = true 74 } 75 76 cflags = [ "-fstack-protector-strong" ] 77 cflags_cc = [ 78 "-Os", 79 "-fno-unwind-tables", 80 "-fstack-protector-strong", 81 ] 82 83 defines = [ 84 "APP_LOG_TAG = \"DistributedBundleMgrService\"", 85 "LOG_DOMAIN = 0xD0011E0", 86 ] 87 sources = [ "native_module.cpp" ] 88 if (distributed_bundle_framework_enable) { 89 sources += [ "distributed_bundle.cpp" ] 90 } else { 91 sources += [ "distributed_bundle_unsupported.cpp" ] 92 } 93 94 configs = [ "${dbms_services_path}:distributed_bms_config" ] 95 96 deps = [ 97 ":distributed_bundle_common", 98 "${dbms_inner_api_path}:dbms_fwk", 99 ] 100 101 external_deps = [ 102 "ability_base:want", 103 "bundle_framework:appexecfwk_base", 104 "bundle_framework:appexecfwk_core", 105 "bundle_framework:bundle_napi_common", 106 "bundle_framework:libappexecfwk_common", 107 "c_utils:utils", 108 "hilog:libhilog", 109 "ipc:ipc_core", 110 "napi:ace_napi", 111 "samgr:samgr_proxy", 112 ] 113 public_external_deps = [ "bundle_framework:bundle_napi_common" ] 114 relative_install_dir = "module/bundle" 115 subsystem_name = "bundlemanager" 116 part_name = "distributed_bundle_framework" 117} 118 119group("jsapi_target") { 120 deps = [ ":distributed_bundle_common" ] 121 122 if (support_jsapi && distributed_bundle_framework_graphics) { 123 deps += [ ":distributedbundlemanager" ] 124 } 125} 126