From 8e40b4fcaae0f05fd7104f9f2e11bbbe4a72475e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 17 Apr 2025 10:14:20 +0800 Subject: [PATCH] =?UTF-8?q?rom=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: unknown --- BUILD.gn | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index a3d0ad1..bea2cad 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -121,6 +121,13 @@ ohos_prebuilt_etc("device_usage_statistics_service_init") { } ohos_shared_library("bundlestate") { + cflags_cc = [ + "-fdata-sections", + "-ffunction-sections", + "-fvisibility=hidden", + "-fstack-protector-strong", + "-Os", + ] sources = [ "frameworks/src/bundle_state_common.cpp", "frameworks/src/bundle_state_init.cpp", @@ -161,6 +168,13 @@ ohos_shared_library("bundlestate") { } ohos_shared_library("usagestatistics") { + cflags_cc = [ + "-fdata-sections", + "-ffunction-sections", + "-fvisibility=hidden", + "-fstack-protector-strong", + "-Os", + ] sources = [ "frameworks/src/app_group_observer_napi.cpp", "frameworks/src/bundle_active_app_group_napi.cpp", @@ -207,7 +221,13 @@ ohos_shared_library("usagestatservice") { shlib_type = "sa" } - cflags_cc = [] + cflags_cc = [ + "-fdata-sections", + "-ffunction-sections", + "-fvisibility=hidden", + "-fstack-protector-strong", + "-Os", + ] sources = [ "services/common/src/bundle_active_account_helper.cpp", "services/common/src/bundle_active_app_state_obsever.cpp", @@ -376,6 +396,12 @@ ohos_static_library("usagestatservice_static") { } ohos_shared_library("usagestatsutils") { + cflags_cc = [ + "-fdata-sections", + "-ffunction-sections", + "-fstack-protector-strong", + "-Os", + ] sources = [ "utils/src/bundle_active_log.cpp", "utils/src/bundle_active_util.cpp", -- Gitee