From 0efade3e4d02300b991419b513d80ae3ace10118 Mon Sep 17 00:00:00 2001 From: sunxuhui Date: Fri, 13 Dec 2024 04:52:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9E=84=E5=BB=BA=E5=AE=8C=E5=96=84=E5=AE=89?= =?UTF-8?q?=E5=85=A8=E9=9A=90=E7=A7=81=E5=90=88=E8=A7=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: sunxuhui --- frameworks/BUILD.gn | 46 +++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/frameworks/BUILD.gn b/frameworks/BUILD.gn index eed7f00..d4f2a5e 100644 --- a/frameworks/BUILD.gn +++ b/frameworks/BUILD.gn @@ -27,6 +27,17 @@ config("tools_bm_config") { } ohos_source_set("tools_bm_source_set") { + branch_protector_ret = "pac_ret" + + sanitize = { + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + integer_overflow = true + ubsan = true + } + sources = [ "${common_path}/log/src/app_log_wrapper.cpp", "${kits_path}/js/bundlemgr/bundle_death_recipient.cpp", @@ -42,6 +53,7 @@ ohos_source_set("tools_bm_source_set") { public_configs = [ ":tools_bm_config" ] cflags = [ "-fstack-protector-strong" ] + cflags_cc = cflags if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] @@ -83,16 +95,6 @@ ohos_source_set("tools_bm_source_set") { } ohos_executable("bm") { - branch_protector_ret = "pac_ret" - - sanitize = { - boundary_sanitize = true - cfi = true - debug = false - integer_overflow = true - ubsan = true - } - deps = [ ":tools_bm_source_set" ] external_deps = [ "hilog:libhilog" ] @@ -104,6 +106,17 @@ ohos_executable("bm") { } ohos_source_set("tools_test_bm_source_set") { + branch_protector_ret = "pac_ret" + + sanitize = { + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + integer_overflow = true + ubsan = true + } + sources = [ "${common_path}/log/src/app_log_wrapper.cpp", "${kits_path}/js/bundlemgr/bundle_death_recipient.cpp", @@ -118,6 +131,7 @@ ohos_source_set("tools_test_bm_source_set") { public_configs = [ ":tools_bm_config" ] cflags = [ "-fstack-protector-strong" ] + cflags_cc = cflags if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] @@ -168,18 +182,6 @@ ohos_source_set("tools_test_bm_source_set") { } ohos_executable("bundle_test_tool") { - branch_protector_ret = "pac_ret" - - sanitize = { - boundary_sanitize = true - cfi = true - debug = false - integer_overflow = true - ubsan = true - } - - cflags = [ "-fstack-protector-strong" ] - deps = [ ":tools_test_bm_source_set" ] install_enable = false -- Gitee