diff --git a/frameworks/BUILD.gn b/frameworks/BUILD.gn index eed7f00d0bc01501118932bf0d702e72b4b1cf9d..d4f2a5ec13b9be6d78631b1f3887e3f956544dc5 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