From b7c24d2ff846ff334383d957dea0dfdd82b42593 Mon Sep 17 00:00:00 2001 From: zhaohang Date: Fri, 2 Feb 2024 15:32:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E9=80=A0config=5Fpolicy\hdf=5Fcore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaohang --- bundle.json | 13 ++++++- frameworks/config_policy/BUILD.gn | 58 +++++++++++++++++++++++-------- interfaces/kits/js/BUILD.gn | 2 +- 3 files changed, 56 insertions(+), 17 deletions(-) diff --git a/bundle.json b/bundle.json index cf2c993..e6bb43b 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 978cbc6..38acdd4 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 2ef6328..e89eb48 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" -- Gitee