diff --git a/CMakeLists.txt b/CMakeLists.txt index 011757e7..9a0e9db5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,20 +37,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE INTERNAL "CMAKE_BUILD_TYPE") endif(NOT CMAKE_BUILD_TYPE) -# Enable LTO if we're in a release build and LTO is supported -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() +# 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 # The MSVC version on AppVeyor CI needs this if(MSVC) diff --git a/ChangeLog.txt b/ChangeLog.txt index 2f8e9c5a..335877e0 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -15,7 +15,6 @@ New platforms: Build changes: * Switch to Conan package manager * 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 * Now requires CMake 3.10 or later, and GCC 7 or later, or Clang 7 or later