From 9d3ca984a458d770df55afe1bce72bf394f7d2a6 Mon Sep 17 00:00:00 2001 From: xieziang Date: Thu, 25 Sep 2025 11:27:46 +0800 Subject: [PATCH] add stack protector Signed-off-by: xieziang --- ui2abc/libarkts/BUILD.gn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui2abc/libarkts/BUILD.gn b/ui2abc/libarkts/BUILD.gn index e7e7c8f3da..7a3ef8c9c1 100644 --- a/ui2abc/libarkts/BUILD.gn +++ b/ui2abc/libarkts/BUILD.gn @@ -125,6 +125,7 @@ shared_library("es2panda_lib") { "-Werror", "-Wno-unused-variable", "-fPIC", + "-fstack-protector-strong", ] ldflags = [ @@ -147,6 +148,7 @@ shared_library("es2panda_lib") { "-Wno-unused-command-line-argument", "-Wno-unused-variable", "-fPIC", + "-fstack-protector-strong", ] ldflags = [ @@ -186,11 +188,9 @@ shared_library("es2panda_lib") { "-instcombine-lower-dbg-declare=0", "-no-canonical-prefixes", "-fuse-ld=lld", - "-fno-stack-protector", "-fno-strict-aliasing", "-Wno-builtin-macro-redefined", "-fms-extensions", - "-static", "-rtlib=compiler-rt", "-stdlib=libc++", "-lunwind", @@ -198,6 +198,7 @@ shared_library("es2panda_lib") { "-Qunused-arguments", "-target", "x86_64-pc-windows-gnu", + "-fstack-protector-strong", "-D__CUSTOM_SECURITY_LIBRARY", ] @@ -208,7 +209,6 @@ shared_library("es2panda_lib") { "-fuse-ld=lld", "-Wl,--icf=all", "-m64", - "-static", "-rtlib=compiler-rt", "-stdlib=libc++", "-std=c++17", -- Gitee