From 4044e62a4df90ed12511a0164c3df8ddb010cadf Mon Sep 17 00:00:00 2001 From: xujintong Date: Mon, 20 Nov 2023 19:55:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96gn=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xujintong --- frameworks/js/backup_ext/BUILD.gn | 10 ++++++++++ tests/utils/BUILD.gn | 10 ++++++++++ tools/backup_tool/BUILD.gn | 10 ++++++++++ utils/BUILD.gn | 10 ++++++++++ 4 files changed, 40 insertions(+) diff --git a/frameworks/js/backup_ext/BUILD.gn b/frameworks/js/backup_ext/BUILD.gn index 313ae8e6c..297159bc1 100644 --- a/frameworks/js/backup_ext/BUILD.gn +++ b/frameworks/js/backup_ext/BUILD.gn @@ -14,6 +14,16 @@ import("//build/ohos.gni") ohos_static_library("backupextensionability_napi_fwk") { + branch_protector_ret = true + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + } + sources = [ "ext_backup_impl.cpp" ] external_deps = [ "napi:ace_napi" ] diff --git a/tests/utils/BUILD.gn b/tests/utils/BUILD.gn index aea2ba640..bab4af694 100644 --- a/tests/utils/BUILD.gn +++ b/tests/utils/BUILD.gn @@ -19,6 +19,16 @@ config("test_util_public_config") { } ohos_static_library("backup_test_utils") { + branch_protector_ret = true + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + } + testonly = true sources = [ "src/test_manager.cpp" ] diff --git a/tools/backup_tool/BUILD.gn b/tools/backup_tool/BUILD.gn index 9ec3a7aca..fbe6de359 100644 --- a/tools/backup_tool/BUILD.gn +++ b/tools/backup_tool/BUILD.gn @@ -15,6 +15,16 @@ import("//build/ohos.gni") import("//foundation/filemanagement/app_file_service/backup.gni") ohos_executable("backup_tool") { + branch_protector_ret = true + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + } + sources = [ "src/main.cpp", "src/tools_op.cpp", diff --git a/utils/BUILD.gn b/utils/BUILD.gn index 3a8524ca6..eae5075ff 100644 --- a/utils/BUILD.gn +++ b/utils/BUILD.gn @@ -41,6 +41,16 @@ ohos_rust_static_ffi("backup_cxx_rust") { } ohos_static_library("backup_cxx_cppdeps") { + branch_protector_ret = true + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + } + part_name = "app_file_service" subsystem_name = "filemanagement" defines = [ "RUST_CXX_NO_EXCEPTIONS" ] -- Gitee