Skip to content

Commit 682b769

Browse files
wangrong1069deepin-bot[bot]
authored andcommitted
chore: Update compiler flags for security enhancements
As title Log: Update compiler flags for security enhancements Bug: https://pms.uniontech.com/bug-view-339563.html
1 parent 7b7c20e commit 682b769

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ else()
4141
endif()
4242

4343
#安全编译参数
44-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong -D_FORTITY_SOURCE=1 -z noexecstack -pie -fPIC -z lazy")
44+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong -D_FORTIFY_SOURCE=2 -z noexecstack -pie -fPIC -z lazy -Wl,-z,relro -Wl,-z,now")
4545

4646
#代码覆盖率开关
4747
if(CMAKE_COVERAGE_ARG STREQUAL "CMAKE_COVERAGE_ARG_ON")

0 commit comments

Comments
 (0)