From e3fcd6c4817ea1409d5529acbdd1b2eb704d4f2d Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Fri, 30 Sep 2016 12:41:55 -1000 Subject: [PATCH] use `-flto=thin` as LTO compiler flag --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index caa1cd8..6005d12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ set(SOURCES # SSELegacy.cpp compiled separately to escape the effects of link-time optimization if(NOT MSVC) set_source_files_properties(${SOURCES} PROPERTIES COMPILE_FLAGS "-msse4.1 -msse4.2 -std=c++14") -string(REPLACE "-flto" "" CUSTOM_FLAGS ${CMAKE_CXX_FLAGS}) +string(REPLACE "-flto=thin" "" CUSTOM_FLAGS ${CMAKE_CXX_FLAGS}) if (CMAKE_OSX_DEPLOYMENT_TARGET AND NOT CMAKE_OSX_DEPLOYMENT_TARGET STREQUAL "") set(CUSTOM_FLAGS "${CUSTOM_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -O3 -msse3 -std=c++14") else()