From c467068a3055669db53c0c8a205e573d61286d3f Mon Sep 17 00:00:00 2001 From: Vladislav Shchapov Date: Mon, 4 Apr 2022 13:37:12 +0500 Subject: [PATCH] Disable LTO in CMake --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c8d8679..f049a0c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -249,6 +249,14 @@ else() endif() endif() +# Disable LTO +if(NOT WITH_NATIVE_INSTRUCTIONS) + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF) + foreach(_cfg_name IN LISTS CMAKE_CONFIGURATION_TYPES) + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_${_cfg_name} OFF) + endforeach() +endif() + # Set architecture alignment requirements if(NOT WITH_UNALIGNED) add_definitions(-DNO_UNALIGNED) -- 2.47.2