mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 21:00:17 -06:00
Merge topic 'fujitsu-clang-findbinutils' into release-3.21
6ce97c2248FujitsuClang: Change LTO option from -flto=thin to -flto3a0effcd16FujitsuClang: Set CMAKE_<LANG>_COMPILER_AR and CMAKE_<LANG>_COMPILER_RANLIB Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6281
This commit is contained in:
@@ -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)
|
||||
|
||||
6
Modules/Compiler/FujitsuClang-FindBinUtils.cmake
Normal file
6
Modules/Compiler/FujitsuClang-FindBinUtils.cmake
Normal file
@@ -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)
|
||||
Reference in New Issue
Block a user