Skip to content

Commit f863489

Browse files
committed
chore: Update compiler flags for security enhancements
As title Log: Update compiler flags for security enhancements Bug: https://pms.uniontech.com/bug-view-337059.html
1 parent 124945d commit f863489

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ if (NOT ${CMAKE_SYSTEM_PROCESSOR} MATCHES "sw_64")
4444
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wl,--as-need -fPIE")
4545
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=incompatible-pointer-types -fPIC")
4646
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wl,--as-need -fPIE -Wno-error=incompatible-pointer-types")
47-
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
47+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie -Wl,-z,relro -Wl,-z,now")
4848
endif()
4949

5050
find_package(Qt${QT_VERSION_MAJOR} REQUIRED ${QtModule})

0 commit comments

Comments
 (0)