summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-03-03 12:55:33 -0500
committerBrad King <brad.king@kitware.com>2022-03-03 12:55:33 -0500
commite47e5c79592ec8e2e58ffe9893e6bec46e895951 (patch)
treef612b2c1ca077dff607ca07597d14ea2f26cb818
parent02b04f1ca8d13410feeebb51756619b8f9d80a22 (diff)
parent29ea94e17c61b485f5cd1036e0ba8282b44ebb0e (diff)
downloadcmake-e47e5c79592ec8e2e58ffe9893e6bec46e895951.tar.gz
Merge branch 'binutils-llvm-ar-clang-macos' into release-3.21
Merge-request: !7039
-rw-r--r--Modules/CMakeFindBinUtils.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake
index f3c2345d44..ba7c405f2a 100644
--- a/Modules/CMakeFindBinUtils.cmake
+++ b/Modules/CMakeFindBinUtils.cmake
@@ -172,7 +172,10 @@ else()
else()
list(PREPEND _CMAKE_LINKER_NAMES "ld.lld")
endif()
- list(PREPEND _CMAKE_AR_NAMES "llvm-ar")
+ if(NOT APPLE)
+ # llvm-ar does not generate a symbol table that the Apple ld64 linker accepts.
+ list(PREPEND _CMAKE_AR_NAMES "llvm-ar")
+ endif()
list(PREPEND _CMAKE_RANLIB_NAMES "llvm-ranlib")
if("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_VERSION}" VERSION_GREATER_EQUAL 11)
# llvm-strip versions prior to 11 require additional flags we do not yet add.