Add -fno-fat-lto-objects to the compiler flags when ICINGA2_LTO_BUILD is enabled

This commit is contained in:
Gunnar Beutner 2015-03-04 10:43:01 +01:00
parent c33e78aa04
commit 24db685806
1 changed files with 2 additions and 2 deletions

View File

@ -141,8 +141,8 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
endif()
if(ICINGA2_LTO_BUILD)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flto")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flto -fno-fat-lto-objects")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto -fno-fat-lto-objects")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flto")
endif()