From 3a0effcd16f657a13390cfd27a13ca334df1ac98 Mon Sep 17 00:00:00 2001 From: Yuichiro Utsumi Date: Tue, 29 Jun 2021 06:38:18 +0000 Subject: FujitsuClang: Set CMAKE__COMPILER_AR and CMAKE__COMPILER_RANLIB Fixes: #22337 --- Modules/Compiler/FujitsuClang-FindBinUtils.cmake | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Modules/Compiler/FujitsuClang-FindBinUtils.cmake (limited to 'Modules') diff --git a/Modules/Compiler/FujitsuClang-FindBinUtils.cmake b/Modules/Compiler/FujitsuClang-FindBinUtils.cmake new file mode 100644 index 0000000000..4a6401d957 --- /dev/null +++ b/Modules/Compiler/FujitsuClang-FindBinUtils.cmake @@ -0,0 +1,6 @@ +if(NOT DEFINED _CMAKE_PROCESSING_LANGUAGE OR _CMAKE_PROCESSING_LANGUAGE STREQUAL "") + message(FATAL_ERROR "Internal error: _CMAKE_PROCESSING_LANGUAGE is not set") +endif() + +set(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR ar) +set(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB ranlib) -- cgit v1.2.1 From 6ce97c2248ca62f7154f6b3eb44119b2a010aa87 Mon Sep 17 00:00:00 2001 From: Yuichiro Utsumi Date: Tue, 29 Jun 2021 08:32:45 +0000 Subject: FujitsuClang: Change LTO option from -flto=thin to -flto Since -flto=thin is not supported officially in FujitsuClang, change to -flto. --- Modules/Compiler/Clang.cmake | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Modules') diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake index 7035d93460..f885eb0234 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) -- cgit v1.2.1