diff options
author | Brad King <brad.king@kitware.com> | 2022-03-04 13:51:50 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-03-04 13:52:05 (GMT) |
commit | 71a8b4e63dd8c80b1c09c665c81a510835174828 (patch) | |
tree | b6660cc5bc6cbd418a634e9f7f7224fe8d1611a7 | |
parent | 50b6744c66998e67e73250fe623d52318d345cdf (diff) | |
parent | 29ea94e17c61b485f5cd1036e0ba8282b44ebb0e (diff) | |
download | CMake-71a8b4e63dd8c80b1c09c665c81a510835174828.zip CMake-71a8b4e63dd8c80b1c09c665c81a510835174828.tar.gz CMake-71a8b4e63dd8c80b1c09c665c81a510835174828.tar.bz2 |
Merge topic 'binutils-llvm-ar-clang-macos' into release-3.23
29ea94e17c BinUtils: Avoid llvm-ar on Apple platforms
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7039
-rw-r--r-- | Modules/CMakeFindBinUtils.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index 6c81754..6dbe626 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. |