CMakeLists.txt: Add "-flto-partition=none" to CMAKE_CXX_FLAGS_RELEASE when using G++ and interprocedural optimization
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
4097b1c59a
commit
bf321d7465
|
@ -87,7 +87,7 @@ if (${IS_GNU})
|
|||
endif()
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fvect-cost-model=unlimited -foptimize-strlen -fsched-pressure -flive-range-shrinkage -fpredictive-commoning -ftree-partial-pre -fzero-call-used-regs=used-gpr-arg -fira-loop-pressure -ftree-loop-distribution -floop-interchange -fsplit-paths -fgcse-las -fgcse-sm -fipa-pta -fstdarg-opt -fivopts")
|
||||
if (${CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE})
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-fwhole-program ${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-fwhole-program -flto-partition=none ${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
endif()
|
||||
elseif(${IS_CLANG})
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${MINIMAL_CLANG} AND NOT ${IGNORE_MINIMAL_COMPILER_VERSION})
|
||||
|
|
Loading…
Reference in New Issue