diff options
author | Brad King <brad.king@kitware.com> | 2022-03-16 14:50:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-03-16 14:50:43 (GMT) |
commit | 12e03d7051b3b466d5755976f50152f307eea6e6 (patch) | |
tree | fa305b27090bcf993fb99397a85b5ff0753eeccf | |
parent | bb99538a45424c880021356139cb51f8873876c7 (diff) | |
parent | fee36b7a784543c3d89e2ef7c531e6892116f237 (diff) | |
download | CMake-12e03d7051b3b466d5755976f50152f307eea6e6.zip CMake-12e03d7051b3b466d5755976f50152f307eea6e6.tar.gz CMake-12e03d7051b3b466d5755976f50152f307eea6e6.tar.bz2 |
Merge branch 'binutils-llvm-ar-apple' into release-3.21
Merge-request: !7077
-rw-r--r-- | Modules/CMakeFindBinUtils.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index 01cb161..84fde49 100644 --- a/Modules/CMakeFindBinUtils.cmake +++ b/Modules/CMakeFindBinUtils.cmake @@ -173,8 +173,13 @@ else() else() list(PREPEND _CMAKE_LINKER_NAMES "ld.lld") endif() - if(NOT APPLE) + if(APPLE) # llvm-ar does not generate a symbol table that the Apple ld64 linker accepts. + # FIXME(#23333): We still need to consider 'llvm-ar' as a fallback because + # the 'APPLE' definition may be based on the host in this context, and a + # cross-compiling toolchain may not have 'ar'. + list(APPEND _CMAKE_AR_NAMES "llvm-ar") + else() list(PREPEND _CMAKE_AR_NAMES "llvm-ar") endif() list(PREPEND _CMAKE_RANLIB_NAMES "llvm-ranlib") |