mirror of https://github.com/Icinga/icinga2.git
Add --gc-sections to the linker flags
This commit is contained in:
parent
6495e85760
commit
663fe5a4bd
|
@ -129,11 +129,14 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
|||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -pthread")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -pthread")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lpthread")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lpthread")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lpthread")
|
||||
else()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
|
||||
endif()
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections")
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
|
|
Loading…
Reference in New Issue