diff --git a/BUILD.gn b/BUILD.gn index c4157ed289ae79b9c8571e622e72bd9d3739b8ea..f38b4e87f9501373f713a0afa7134b6f154e526e 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -54,6 +54,11 @@ ohos_shared_library("tel_state_registry") { "samgr:samgr_proxy", ] + cflags_cc = [ + "-O2", + "-D_FORTIFY_SOURCE=2", + ] + defines = [ "TELEPHONY_LOG_TAG = \"StateRegistry\"", "LOG_DOMAIN = 0xD001F07", diff --git a/frameworks/native/observer/BUILD.gn b/frameworks/native/observer/BUILD.gn index be2dd7bcb6c021851c228fb07c6e2103868d8624..e028a4802c720a07b89691855f5c52a54d672e4e 100644 --- a/frameworks/native/observer/BUILD.gn +++ b/frameworks/native/observer/BUILD.gn @@ -54,6 +54,12 @@ ohos_shared_library("tel_state_registry_api") { "TELEPHONY_LOG_TAG = \"StateRegistryApi\"", "LOG_DOMAIN = 0xD001F07", ] + + cflags_cc = [ + "-O2", + "-D_FORTIFY_SOURCE=2", + ] + install_images = [ system_base_dir ] relative_install_dir = "platformsdk" innerapi_tags = [ "platformsdk" ]