From b5334b3f2130fc6b618d38397da96b5a060f788a Mon Sep 17 00:00:00 2001 From: sunxuhui Date: Fri, 13 Dec 2024 04:56:24 +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 --- interfaces/inner_api/BUILD.gn | 1 + interfaces/kits/js/distributebundlemgr/BUILD.gn | 2 ++ interfaces/kits/js/distributedBundle/BUILD.gn | 2 ++ services/dbms/BUILD.gn | 1 + services/dbms/test/unittest/dbms_services_kit_test/BUILD.gn | 5 +++++ 5 files changed, 11 insertions(+) diff --git a/interfaces/inner_api/BUILD.gn b/interfaces/inner_api/BUILD.gn index 4fda217..4458b73 100644 --- a/interfaces/inner_api/BUILD.gn +++ b/interfaces/inner_api/BUILD.gn @@ -31,6 +31,7 @@ ohos_shared_library("dbms_fwk") { } cflags = [ "-fstack-protector-strong" ] + cflags_cc = cflags sources = [ "src/distributed_bms_proxy.cpp" ] diff --git a/interfaces/kits/js/distributebundlemgr/BUILD.gn b/interfaces/kits/js/distributebundlemgr/BUILD.gn index 4223a86..196b268 100644 --- a/interfaces/kits/js/distributebundlemgr/BUILD.gn +++ b/interfaces/kits/js/distributebundlemgr/BUILD.gn @@ -20,12 +20,14 @@ ohos_shared_library("distributedbundle") { sanitize = { boundary_sanitize = true cfi = true + cfi_cross_dso = true debug = false integer_overflow = true ubsan = true } cflags = [ "-fstack-protector-strong" ] + cflags_cc = cflags include_dirs = [] defines = [ diff --git a/interfaces/kits/js/distributedBundle/BUILD.gn b/interfaces/kits/js/distributedBundle/BUILD.gn index dc3b44a..0c1964b 100644 --- a/interfaces/kits/js/distributedBundle/BUILD.gn +++ b/interfaces/kits/js/distributedBundle/BUILD.gn @@ -20,12 +20,14 @@ ohos_shared_library("distributedbundlemanager") { sanitize = { boundary_sanitize = true cfi = true + cfi_cross_dso = true debug = false integer_overflow = true ubsan = true } cflags = [ "-fstack-protector-strong" ] + cflags_cc = cflags defines = [ "APP_LOG_TAG = \"DistributedBundleMgrService\"", diff --git a/services/dbms/BUILD.gn b/services/dbms/BUILD.gn index 1b70d3b..6567949 100644 --- a/services/dbms/BUILD.gn +++ b/services/dbms/BUILD.gn @@ -37,6 +37,7 @@ ohos_shared_library("libdbms") { } cflags = [ "-fstack-protector-strong" ] + cflags_cc = cflags sources = [ "src/account_manager_helper.cpp", diff --git a/services/dbms/test/unittest/dbms_services_kit_test/BUILD.gn b/services/dbms/test/unittest/dbms_services_kit_test/BUILD.gn index 1ee5cde..249668c 100644 --- a/services/dbms/test/unittest/dbms_services_kit_test/BUILD.gn +++ b/services/dbms/test/unittest/dbms_services_kit_test/BUILD.gn @@ -16,6 +16,11 @@ import("../../../../../dbms.gni") module_output_path = "bundle_framework/distributedbundleservice" ohos_unittest("DbmsServicesKitTest") { + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + } use_exceptions = true module_out_path = module_output_path include_dirs = [ -- Gitee