CMakeLists.txt: Add "-Wl,--gc-sections" to the linker flags for release builds
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
845e9e3cb7
commit
bf94b8c6eb
|
@ -84,7 +84,7 @@ if (${IS_GNU} OR ${IS_CLANG})
|
|||
set(CMAKE_EXE_LINKER_FLAGS "--closure-args=\"--compilation_level SIMPLE\" -sPROXY_TO_PTHREAD=1 ${CMAKE_EXE_LINKER_FLAGS}") # See https://github.com/emscripten-core/emscripten/issues/16706
|
||||
endif()
|
||||
endif()
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-s")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-Wl,--gc-sections -s")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstrict-enums -pipe -funwind-tables -fasynchronous-unwind-tables -frtti -fexceptions")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffunction-sections -fdata-sections -fmerge-all-constants -ftree-vectorize -fno-math-errno")
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
|
Loading…
Reference in New Issue