Disable LTO because crypto++ has problems with it
This commit is contained in:
parent
46ada21a30
commit
5cf5816675
@ -37,20 +37,7 @@ if(NOT CMAKE_BUILD_TYPE)
|
|||||||
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE INTERNAL "CMAKE_BUILD_TYPE")
|
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE INTERNAL "CMAKE_BUILD_TYPE")
|
||||||
endif(NOT CMAKE_BUILD_TYPE)
|
endif(NOT CMAKE_BUILD_TYPE)
|
||||||
|
|
||||||
# Enable LTO if we're in a release build and LTO is supported
|
# We don't use LTO because crypto++ has problems with it, see https://github.com/weidai11/cryptopp/issues/1031 and https://www.cryptopp.com/wiki/Link_Time_Optimization
|
||||||
string(TOUPPER ${CMAKE_BUILD_TYPE} _CMAKE_BUILD_TYPE_UPPER)
|
|
||||||
if (_CMAKE_BUILD_TYPE_UPPER STREQUAL "DEBUG")
|
|
||||||
message(STATUS "LTO disabled because we're in a debug build")
|
|
||||||
else()
|
|
||||||
include(CheckIPOSupported)
|
|
||||||
check_ipo_supported(RESULT LTO_SUPPORTED OUTPUT error)
|
|
||||||
if(LTO_SUPPORTED)
|
|
||||||
message(STATUS "LTO enabled")
|
|
||||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
|
||||||
else()
|
|
||||||
message(WARNING "LTO disabled because compiler does not support it.")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# The MSVC version on AppVeyor CI needs this
|
# The MSVC version on AppVeyor CI needs this
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
|
@ -15,7 +15,6 @@ New platforms:
|
|||||||
Build changes:
|
Build changes:
|
||||||
* Switch to Conan package manager
|
* Switch to Conan package manager
|
||||||
* Allow an easy way to modify how the dependencies are found. This is mostly helpful for package maintainers.
|
* Allow an easy way to modify how the dependencies are found. This is mostly helpful for package maintainers.
|
||||||
* Build with LTO if the compiler supports it
|
|
||||||
* Build with macFUSE instead of osxfuse on OSX
|
* Build with macFUSE instead of osxfuse on OSX
|
||||||
* Now requires CMake 3.10 or later, and GCC 7 or later, or Clang 7 or later
|
* Now requires CMake 3.10 or later, and GCC 7 or later, or Clang 7 or later
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user