diff --git a/bundle.json b/bundle.json index cf2c9933ec771c0651d7a5e771c6c9b379b32783..e6bb43b313358f0391f62329d3b77f514b5ab0e6 100644 --- a/bundle.json +++ b/bundle.json @@ -25,7 +25,9 @@ "hisysevent", "hilog", "napi", - "init" + "init", + "bounds_checking_function", + "core_service" ], "third_party": [ "bounds_checking_function" @@ -44,6 +46,15 @@ ] }, "name": "//base/customization/config_policy/frameworks/config_policy:configpolicy_util" + }, + { + "header": { + "header_base": "//base/customization/config_policy/interfaces/inner_api/include", + "header_files": [ + "config_policy_utils.h" + ] + }, + "name": "//base/customization/config_policy/frameworks/config_policy:configpolicy_util_for_init_static" } ], "test": [ diff --git a/frameworks/config_policy/BUILD.gn b/frameworks/config_policy/BUILD.gn index 978cbc6e6ce811b21f0a4d19461399fbe228963c..38acdd48f99b811a00c79ba57b3d62c32b0df0c4 100644 --- a/frameworks/config_policy/BUILD.gn +++ b/frameworks/config_policy/BUILD.gn @@ -20,12 +20,7 @@ if (defined(ohos_lite)) { config_policy_sources = [ "src/config_policy_utils.c" ] config("config_policy_config") { - include_dirs = [ - "../../interfaces/inner_api/include", - "//third_party/bounds_checking_function/include", - "$STARTUP_INIT_ROOT_DIR/interfaces/innerkits/include/param", - "$TEL_CORESERVICE_ROOT_DIR/utils/common/include", - ] + include_dirs = [ "../../interfaces/inner_api/include" ] } if (defined(ohos_lite) && ohos_kernel_type == "liteos_m") { @@ -35,26 +30,46 @@ if (defined(ohos_lite) && ohos_kernel_type == "liteos_m") { print("cust config_policy_fs_prefix: ${config_policy_fs_prefix}") defines = [ "ROOT_PREFIX=\"${config_policy_fs_prefix}\"" ] } - include_dirs = [ - "../../interfaces/inner_api/include", - "//third_party/bounds_checking_function/include", - ] + include_dirs = [ "../../interfaces/inner_api/include" ] + external_deps = [ "bounds_checking_function:libsec_shared" ] } } else if (defined(ohos_lite)) { shared_library("configpolicy_util") { sources = config_policy_sources public_configs = [ ":config_policy_config" ] - deps = [ "//third_party/bounds_checking_function:libsec_shared" ] + if (defined(external_deps)) { + external_deps += [ + "bounds_checking_function:libsec_shared", + "core_service:export_header_lib", + "init:export_headers_lib", + ] + } else { + external_deps = [ + "bounds_checking_function:libsec_shared", + "core_service:export_header_lib", + "init:export_headers_lib", + ] + } } } else { ohos_shared_library("configpolicy_util") { sources = config_policy_sources public_configs = [ ":config_policy_config" ] - deps = [ - "etc:customization_etc", - "//third_party/bounds_checking_function:libsec_shared", - ] + deps = [ "etc:customization_etc" ] external_deps = [ "init:libbegetutil" ] + if (defined(external_deps)) { + external_deps += [ + "bounds_checking_function:libsec_shared", + "core_service:export_header_lib", + "init:export_headers_lib", + ] + } else { + external_deps = [ + "bounds_checking_function:libsec_shared", + "core_service:export_header_lib", + "init:export_headers_lib", + ] + } install_images = [ "system", "updater", @@ -72,5 +87,18 @@ if (defined(ohos_lite) && ohos_kernel_type == "liteos_m") { public_configs = [ ":config_policy_config" ] subsystem_name = "customization" part_name = "config_policy" + if (defined(external_deps)) { + external_deps += [ + "bounds_checking_function:libsec_shared", + "core_service:export_header_lib", + "init:export_headers_lib", + ] + } else { + external_deps = [ + "bounds_checking_function:libsec_shared", + "core_service:export_header_lib", + "init:export_headers_lib", + ] + } } } diff --git a/interfaces/kits/js/BUILD.gn b/interfaces/kits/js/BUILD.gn index 2ef63286431b4ec1d21bcd01faf8e7fcfcf17ee3..e89eb487295d2ad3547432f961fd26f3cd01071e 100644 --- a/interfaces/kits/js/BUILD.gn +++ b/interfaces/kits/js/BUILD.gn @@ -17,7 +17,6 @@ ohos_shared_library("configpolicy") { include_dirs = [ "include", "../../../interfaces/inner_api/include", - "//third_party/bounds_checking_function/include", "../../../frameworks/dfx/hisysevent_adapter", ] @@ -31,6 +30,7 @@ ohos_shared_library("configpolicy") { "hilog:libhilog", "hisysevent:libhisysevent", "napi:ace_napi", + "bounds_checking_function:libsec_shared", ] relative_install_dir = "module" subsystem_name = "customization"