From ddfa7a5c5b71017b48f94dfa463d76a374c21f3d Mon Sep 17 00:00:00 2001 From: lichao Date: Tue, 20 Feb 2024 16:28:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=83=A8=E4=BB=B6?= =?UTF-8?q?=E7=8B=AC=E7=AB=8B=E7=BC=96=E8=AF=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lichao --- 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 From e7a22982fb4af155a2c5279615a6b02fcb8dbb82 Mon Sep 17 00:00:00 2001 From: lichao Date: Wed, 28 Feb 2024 10:12:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=83=A8=E4=BB=B6?= =?UTF-8?q?=E7=8B=AC=E7=AB=8B=E7=BC=96=E8=AF=91=E4=BF=AE=E6=94=B9--=20conf?= =?UTF-8?q?ig=5Fpolicy=E6=98=AF=E9=80=9A=E7=94=A8=E9=83=A8=E4=BB=B6?= =?UTF-8?q?=EF=BC=8Ccore=5Fservice=E6=98=AF=E9=9D=9E=E9=80=9A=E7=94=A8?= =?UTF-8?q?=E7=9A=84=EF=BC=8C=E6=89=80=E4=BB=A5=E5=9B=9E=E9=80=80=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=8Cconfig=5Fpolicy=E7=BB=9D=E5=AF=B9=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E4=BE=9D=E8=B5=96core=5Fservice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lichao --- bundle.json | 3 +- frameworks/config_policy/BUILD.gn | 58 ++++++++----------------------- 2 files changed, 16 insertions(+), 45 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 38acdd4..978cbc6 100644 --- a/frameworks/config_policy/BUILD.gn +++ b/frameworks/config_policy/BUILD.gn @@ -20,7 +20,12 @@ if (defined(ohos_lite)) { config_policy_sources = [ "src/config_policy_utils.c" ] config("config_policy_config") { - include_dirs = [ "../../interfaces/inner_api/include" ] + 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", + ] } if (defined(ohos_lite) && ohos_kernel_type == "liteos_m") { @@ -30,46 +35,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", + "//third_party/bounds_checking_function/include", + ] } } else if (defined(ohos_lite)) { shared_library("configpolicy_util") { sources = config_policy_sources public_configs = [ ":config_policy_config" ] - 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", - ] - } + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } } else { ohos_shared_library("configpolicy_util") { sources = config_policy_sources public_configs = [ ":config_policy_config" ] - deps = [ "etc:customization_etc" ] + deps = [ + "etc:customization_etc", + "//third_party/bounds_checking_function:libsec_shared", + ] 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", @@ -87,18 +72,5 @@ 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", - ] - } } } -- Gitee