CMakeLists.txt: Use ThinLTO instead of full LTO when Clang is present
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
344b810f12
commit
d2a83a2f5e
|
@ -110,7 +110,7 @@ elseif(${IS_CLANG})
|
|||
message(FATAL_ERROR "Clang ${MINIMAL_CLANG} or higher is required.")
|
||||
endif()
|
||||
if (${CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE} OR MINGW) # CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE is false on llvm-mingw toolchains even though it is supported
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -flto=full")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -flto=thin")
|
||||
if (NOT DEFINED EMSCRIPTEN)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fwhole-program-vtables")
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue