mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
AIX: Disable LTO/IPO with GCC, which does not support it
The GNU compiler does not support LTO on AIX.
This commit is contained in:
@@ -77,7 +77,8 @@ macro(__compiler_gnu lang)
|
||||
# '-flto' introduced since GCC 4.5:
|
||||
# * https://gcc.gnu.org/onlinedocs/gcc-4.4.7/gcc/Option-Summary.html (no)
|
||||
# * https://gcc.gnu.org/onlinedocs/gcc-4.5.4/gcc/Option-Summary.html (yes)
|
||||
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.5)
|
||||
# * It does not support AIX.
|
||||
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.5 AND NOT CMAKE_SYSTEM_NAME STREQUAL "AIX")
|
||||
set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES)
|
||||
|
||||
set(__lto_flags "")
|
||||
|
||||
Reference in New Issue
Block a user