summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/Clang.cmake
diff options
context:
space:
mode:
authorYuichiro Utsumi <utsumi.yuichiro@jp.fujitsu.com>2021-06-29 08:32:45 (GMT)
committerBrad King <brad.king@kitware.com>2021-06-29 13:31:53 (GMT)
commit6ce97c2248ca62f7154f6b3eb44119b2a010aa87 (patch)
tree21e87332a574b0d4510af33f571a10788976140f /Modules/Compiler/Clang.cmake
parent3a0effcd16f657a13390cfd27a13ca334df1ac98 (diff)
downloadCMake-6ce97c2248ca62f7154f6b3eb44119b2a010aa87.zip
CMake-6ce97c2248ca62f7154f6b3eb44119b2a010aa87.tar.gz
CMake-6ce97c2248ca62f7154f6b3eb44119b2a010aa87.tar.bz2
FujitsuClang: Change LTO option from -flto=thin to -flto
Since -flto=thin is not supported officially in FujitsuClang, change to -flto.
Diffstat (limited to 'Modules/Compiler/Clang.cmake')
-rw-r--r--Modules/Compiler/Clang.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake
index 7035d93..f885eb0 100644
--- a/Modules/Compiler/Clang.cmake
+++ b/Modules/Compiler/Clang.cmake
@@ -56,6 +56,7 @@ else()
set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES)
string(COMPARE EQUAL "${CMAKE_${lang}_COMPILER_ID}" "AppleClang" __is_apple_clang)
+ string(COMPARE EQUAL "${CMAKE_${lang}_COMPILER_ID}" "FujitsuClang" __is_fujitsu_clang)
# '-flto=thin' available since Clang 3.9 and Xcode 8
# * http://clang.llvm.org/docs/ThinLTO.html#clang-llvm
@@ -65,6 +66,8 @@ else()
if(CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 8.0)
set(_CMAKE_LTO_THIN FALSE)
endif()
+ elseif(__is_fujitsu_clang)
+ set(_CMAKE_LTO_THIN FALSE)
else()
if(CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.9)
set(_CMAKE_LTO_THIN FALSE)