diff --git a/interfaces/innerkits/BUILD.gn b/interfaces/innerkits/BUILD.gn index 713457d04ef3471e1ec4f136b07e8c9cc2adb832..4a50219d1256f3ccaa0fd0215a502969c64cf7f5 100755 --- a/interfaces/innerkits/BUILD.gn +++ b/interfaces/innerkits/BUILD.gn @@ -32,6 +32,12 @@ config("udmf_client_config") { } ohos_shared_library("udmf_client") { + branch_protector_ret = "pac_ret" + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + } sources = [ "${udmf_framework_path}/common/graph.cpp", "${udmf_framework_path}/common/tlv_util.cpp", diff --git a/interfaces/jskits/BUILD.gn b/interfaces/jskits/BUILD.gn index f1e1316a9054c6331f222efa8fc7a170133930ff..a23a56d136dc3d76380665b7d29da86f51e1cf16 100755 --- a/interfaces/jskits/BUILD.gn +++ b/interfaces/jskits/BUILD.gn @@ -37,6 +37,12 @@ config("udmf_napi_config") { } ohos_shared_library("unifieddatachannel_napi") { + branch_protector_ret = "pac_ret" + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + } sources = [ "${udmf_framework_path}/jskitsimpl/data/application_defined_record_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/audio_napi.cpp", @@ -84,6 +90,12 @@ ohos_shared_library("unifieddatachannel_napi") { } ohos_shared_library("uniformtypedescriptor_napi") { + branch_protector_ret = "pac_ret" + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + } sources = [ "${udmf_framework_path}/jskitsimpl/data/type_descriptor_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/uniform_type_descriptor_napi.cpp", @@ -113,6 +125,12 @@ ohos_shared_library("uniformtypedescriptor_napi") { } ohos_shared_library("udmf_data_napi") { + branch_protector_ret = "pac_ret" + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + } sources = [ "${udmf_framework_path}/jskitsimpl/data/application_defined_record_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/audio_napi.cpp", @@ -159,6 +177,12 @@ ohos_shared_library("udmf_data_napi") { } ohos_static_library("udmf_js_common") { + branch_protector_ret = "pac_ret" + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + } sources = [ "${udmf_framework_path}/jskitsimpl/common/napi_data_utils.cpp", "${udmf_framework_path}/jskitsimpl/common/napi_error_utils.cpp",