From 3448c14c18fdda5bac100a2e723781822b9d6e93 Mon Sep 17 00:00:00 2001 From: chenqi Date: Wed, 3 Aug 2022 17:17:45 +0800 Subject: [PATCH] Add Stack Protector for Containers issue https://gitee.com/openharmony/js_util_module/issues/I5KIUF Description Add cflags = [ "-fstack-protector-all" ] in BUILD.gn Signed-off-by: chenqi --- container/BUILD.gn | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/container/BUILD.gn b/container/BUILD.gn index 5c65243..32d7c2a 100644 --- a/container/BUILD.gn +++ b/container/BUILD.gn @@ -51,6 +51,10 @@ action("build_js_ts") { } } +config("container_config") { + cflags = [ "-fstack-protector-all" ] +} + # libs template("container_lib") { forward_variables_from(invoker, "*") @@ -118,6 +122,8 @@ template("container_lib") { deps += [ dep_abc ] deps += [ dep_js ] + configs = [ ":container_config" ] + if (is_standard_system) { external_deps = [ "hiviewdfx_hilog_native:libhilog" ] } else { -- Gitee