diff --git a/interfaces/inner_kits/native_cpp/BUILD.gn b/interfaces/inner_kits/native_cpp/BUILD.gn index 2068a5585b19c581039241a6e5110ae529ed7035..34f6487860db5378b2c74bf943d03e111b9e1cab 100644 --- a/interfaces/inner_kits/native_cpp/BUILD.gn +++ b/interfaces/inner_kits/native_cpp/BUILD.gn @@ -156,6 +156,9 @@ if (defined(ohos_lite)) { boundary_sanitize = true integer_overflow = true ubsan = true + cfi = true + cfi_cross_dso = true + debug = false } cflags = [ diff --git a/radar/BUILD.gn b/radar/BUILD.gn index 1a5793e7ad2d44f7e2055b5a8a08524d55c90247..49dc533a0e4fd4101da4b43289fa00b47debdf90 100644 --- a/radar/BUILD.gn +++ b/radar/BUILD.gn @@ -68,7 +68,7 @@ if (defined(ohos_lite)) { "${innerkits_path}/native_cpp/include", "${json_path}/include", ] - + branch_protector_ret = "pac_ret" sanitize = { cfi = true cfi_cross_dso = true @@ -125,7 +125,7 @@ if (defined(ohos_lite)) { "${innerkits_path}/native_cpp/include", "${json_path}/include", ] - + branch_protector_ret = "pac_ret" sanitize = { cfi = true cfi_cross_dso = true diff --git a/services/softbuscache/BUILD.gn b/services/softbuscache/BUILD.gn index 49a243c36afd9896067c0f8e8a4bcd6b9336462e..304974efe0e0536286bf2afe4238e038d78ddb72 100644 --- a/services/softbuscache/BUILD.gn +++ b/services/softbuscache/BUILD.gn @@ -50,6 +50,7 @@ if (defined(ohos_lite)) { } } else { ohos_shared_library("dmdevicecache") { + branch_protector_ret = "pac_ret" sanitize = { boundary_sanitize = true cfi = true