diff options
| author | Sam James <sam@gentoo.org> | 2025-10-05 21:34:28 +0100 |
|---|---|---|
| committer | Andreas Sturmlechner <asturm@gentoo.org> | 2025-10-16 21:13:57 +0200 |
| commit | 1d5d6cb751e803d7e4d525e8a01d72786b400942 (patch) | |
| tree | a21e735f936d2931e97083498599030fa38134cc /eclass/cmake.eclass | |
| parent | cd27638d4ee90e928df8fd6dc6c243f104a273a1 (diff) | |
| download | gentoo-1d5d6cb751e803d7e4d525e8a01d72786b400942.tar.gz gentoo-1d5d6cb751e803d7e4d525e8a01d72786b400942.tar.bz2 gentoo-1d5d6cb751e803d7e4d525e8a01d72786b400942.zip | |
cmake.eclass: disable automagic LTO
Pass -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF to avoid automagically
enabling LTO if the compiler supports it.
Note that unlike what we do w/ meson.eclass, we can't do some magic
with `tc-is-lto` here because CMake doesn't allow refining the parallelism
used. But that's fine.
This change still allows using LTO via *FLAGS which is what we tell
people to do.
Closes: https://bugs.gentoo.org/927157
Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'eclass/cmake.eclass')
| -rw-r--r-- | eclass/cmake.eclass | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass index 0a8b93c215aa..7526d492493f 100644 --- a/eclass/cmake.eclass +++ b/eclass/cmake.eclass @@ -633,6 +633,7 @@ cmake_src_configure() { set(BUILD_SHARED_LIBS ON CACHE BOOL "") set(Python3_FIND_UNVERSIONED_NAMES FIRST CACHE STRING "") set(CMAKE_DISABLE_PRECOMPILE_HEADERS ON CACHE BOOL "") + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF CACHE BOOL "") set(CMAKE_TLS_VERIFY ON CACHE BOOL "") set(CMAKE_COMPILE_WARNING_AS_ERROR OFF CACHE BOOL "") _EOF_ |
