This commit is contained in:
Yuhang Zhao 2023-06-26 13:24:32 +08:00
parent 22059c148e
commit da58607bcd
1 changed files with 1 additions and 1 deletions

View File

@ -684,7 +684,7 @@ function(setup_compile_params)
)
else()
target_link_options(${__target} PRIVATE
-Wl,--fatal-warnings -Wl,--build-id=sha1 -Wl,--no-undefined
-Wl,--fatal-warnings -Wl,--build-id=sha1 -Wl,--no-undefined -Wl,--as-needed -Wl,-z,defs
$<$<NOT:$<CONFIG:Debug>>:-Wl,--gc-sections -Wl,-O3 -Wl,--no-keep-memory -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack>
$<$<CONFIG:Release>:-Wl,--strip-all>
)