Configurable LTO (#4755)
This commit is contained in:
parent
78f72bbfc4
commit
8b0b800008
@ -97,11 +97,11 @@ set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
# The need for speed (in Release)
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT IPO_SUPPORTED)
|
||||
if(IPO_SUPPORTED)
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON)
|
||||
# The need for speed (in Release):
|
||||
if(WHOLE_PROGRAM_OPTIMISATION)
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT IPO_SUPPORTED)
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ${IPO_SUPPORTED})
|
||||
endif()
|
||||
|
||||
# Static CRT
|
||||
|
@ -20,12 +20,13 @@ if [ `which ccache` ]; then
|
||||
ccache -z # Zero statistics
|
||||
fi
|
||||
|
||||
# Work around a Clang + ccache issue with failing
|
||||
# builds by disabling precompiled headers
|
||||
# Work around a Clang + ccache issue with failing builds by disabling
|
||||
# precompiled headers. Turn off LTO for faster build speeds
|
||||
cmake . -DBUILD_TOOLS=YES \
|
||||
-DPRECOMPILE_HEADERS=NO \
|
||||
-DUNITY_BUILDS=${TRAVIS_CUBERITE_UNITY_BUILDS-YES} \
|
||||
-DSELF_TEST=YES \
|
||||
-DWHOLE_PROGRAM_OPTIMISATION=No \
|
||||
${CACHE_ARGS};
|
||||
|
||||
echo "Building..."
|
||||
|
Loading…
x
Reference in New Issue
Block a user