From b19cd981e1bdb7a811ce80c835b075c9d7890caa Mon Sep 17 00:00:00 2001 From: zhaohang Date: Wed, 31 Jan 2024 14:44:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=83=A8=E4=BB=B6=E7=8B=AC=E7=AB=8B?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E6=94=B9=E9=80=A0?= 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 | 29 +++++++++++++++++++++++------ interfaces/kits/js/BUILD.gn | 2 +- 3 files changed, 36 insertions(+), 8 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..bd6501b 100644 --- a/frameworks/config_policy/BUILD.gn +++ b/frameworks/config_policy/BUILD.gn @@ -22,7 +22,12 @@ config_policy_sources = [ "src/config_policy_utils.c" ] config("config_policy_config") { include_dirs = [ "../../interfaces/inner_api/include", - "//third_party/bounds_checking_function/include", + ] +} + +config("config_policy_config_for_static") { + include_dirs = [ + "../../interfaces/inner_api/include", "$STARTUP_INIT_ROOT_DIR/interfaces/innerkits/include/param", "$TEL_CORESERVICE_ROOT_DIR/utils/common/include", ] @@ -37,14 +42,20 @@ if (defined(ohos_lite) && ohos_kernel_type == "liteos_m") { } include_dirs = [ "../../interfaces/inner_api/include", - "//third_party/bounds_checking_function/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" ] + external_deps = [ + "bounds_checking_function:libsec_shared", + "init:libbegetutil", + "core_service:libtel_common" + ] } } else { ohos_shared_library("configpolicy_util") { @@ -52,9 +63,12 @@ if (defined(ohos_lite) && ohos_kernel_type == "liteos_m") { public_configs = [ ":config_policy_config" ] deps = [ "etc:customization_etc", - "//third_party/bounds_checking_function:libsec_shared", ] - external_deps = [ "init:libbegetutil" ] + external_deps = [ + "bounds_checking_function:libsec_shared", + "init:libbegetutil", + "core_service:libtel_common" + ] install_images = [ "system", "updater", @@ -69,8 +83,11 @@ if (defined(ohos_lite) && ohos_kernel_type == "liteos_m") { } ohos_static_library("configpolicy_util_for_init_static") { sources = config_policy_sources - public_configs = [ ":config_policy_config" ] + public_configs = [ ":config_policy_config_for_static" ] subsystem_name = "customization" part_name = "config_policy" + external_deps = [ + "bounds_checking_function:libsec_shared" + ] } } 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 From 996751cb29e55eab619c6c5a30a632e926267a01 Mon Sep 17 00:00:00 2001 From: zhaohang Date: Wed, 31 Jan 2024 17:23:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=97=A8=E7=A6=81?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaohang --- bundle.json | 3 +-- frameworks/config_policy/BUILD.gn | 23 +++++++---------------- interfaces/kits/js/BUILD.gn | 2 +- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/bundle.json b/bundle.json index e6bb43b..7032041 100644 --- a/bundle.json +++ b/bundle.json @@ -26,8 +26,7 @@ "hilog", "napi", "init", - "bounds_checking_function", - "core_service" + "bounds_checking_function" ], "third_party": [ "bounds_checking_function" diff --git a/frameworks/config_policy/BUILD.gn b/frameworks/config_policy/BUILD.gn index bd6501b..5445644 100644 --- a/frameworks/config_policy/BUILD.gn +++ b/frameworks/config_policy/BUILD.gn @@ -22,6 +22,7 @@ config_policy_sources = [ "src/config_policy_utils.c" ] config("config_policy_config") { include_dirs = [ "../../interfaces/inner_api/include", + "$TEL_CORESERVICE_ROOT_DIR/utils/common/include", ] } @@ -40,34 +41,26 @@ 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", - ] - external_deps = [ - "bounds_checking_function:libsec_shared" - ] + 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" ] - external_deps = [ + external_deps = [ "bounds_checking_function:libsec_shared", "init:libbegetutil", - "core_service:libtel_common" ] } } else { ohos_shared_library("configpolicy_util") { sources = config_policy_sources public_configs = [ ":config_policy_config" ] - deps = [ - "etc:customization_etc", - ] - external_deps = [ + deps = [ "etc:customization_etc" ] + external_deps = [ "bounds_checking_function:libsec_shared", "init:libbegetutil", - "core_service:libtel_common" ] install_images = [ "system", @@ -86,8 +79,6 @@ if (defined(ohos_lite) && ohos_kernel_type == "liteos_m") { public_configs = [ ":config_policy_config_for_static" ] subsystem_name = "customization" part_name = "config_policy" - external_deps = [ - "bounds_checking_function:libsec_shared" - ] + external_deps = [ "bounds_checking_function:libsec_shared" ] } } diff --git a/interfaces/kits/js/BUILD.gn b/interfaces/kits/js/BUILD.gn index e89eb48..215ed48 100644 --- a/interfaces/kits/js/BUILD.gn +++ b/interfaces/kits/js/BUILD.gn @@ -27,10 +27,10 @@ ohos_shared_library("configpolicy") { deps = [ "../../../frameworks/config_policy:configpolicy_util" ] external_deps = [ + "bounds_checking_function:libsec_shared", "hilog:libhilog", "hisysevent:libhisysevent", "napi:ace_napi", - "bounds_checking_function:libsec_shared", ] relative_install_dir = "module" subsystem_name = "customization" -- Gitee