move --gc-sections to shared libraries only
This commit is contained in:
parent
73b6ab047d
commit
399b199266
@ -161,7 +161,6 @@ function(give_options_without_warnings target)
|
|||||||
-O3
|
-O3
|
||||||
-flto=$<IF:$<STREQUAL:${CMAKE_C_COMPILER_ID},Clang>,thin,auto>
|
-flto=$<IF:$<STREQUAL:${CMAKE_C_COMPILER_ID},Clang>,thin,auto>
|
||||||
-mavx -mavx2
|
-mavx -mavx2
|
||||||
-Wl,--gc-sections
|
|
||||||
-fdata-sections
|
-fdata-sections
|
||||||
-ffunction-sections
|
-ffunction-sections
|
||||||
-funroll-loops
|
-funroll-loops
|
||||||
@ -177,6 +176,7 @@ function(give_options_without_warnings target)
|
|||||||
$<$<BOOL:${EMSCRIPTEN}>:-gsource-map>)
|
$<$<BOOL:${EMSCRIPTEN}>:-gsource-map>)
|
||||||
|
|
||||||
set(BUILD_SHARED_LIBRARY_FLAGS_RELEASE
|
set(BUILD_SHARED_LIBRARY_FLAGS_RELEASE
|
||||||
|
-Wl,--gc-sections # TODO: is it even needed with LTO?
|
||||||
$<$<STREQUAL:${CMAKE_C_COMPILER_ID},Clang>:-Wl,-plugin-opt,cache-dir=${CMAKE_CURRENT_BINARY_DIR}/linker-cache/>
|
$<$<STREQUAL:${CMAKE_C_COMPILER_ID},Clang>:-Wl,-plugin-opt,cache-dir=${CMAKE_CURRENT_BINARY_DIR}/linker-cache/>
|
||||||
$<$<STREQUAL:${CMAKE_C_COMPILER_ID},Clang>:-Wl,-plugin-opt,cache-policy=prune_after=30m>)
|
$<$<STREQUAL:${CMAKE_C_COMPILER_ID},Clang>:-Wl,-plugin-opt,cache-policy=prune_after=30m>)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user