diff options
author | Brad King <brad.king@kitware.com> | 2021-10-22 13:14:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-10-22 13:24:46 (GMT) |
commit | 5dd981539f6b81ad5697df974f309d9a6d4e78c6 (patch) | |
tree | e9e179049c2deb42359200a82ce2126822821420 /Modules/CMakeFindBinUtils.cmake | |
parent | 69c6994023c05aefdbec15cacf2b4dae9e12622e (diff) | |
download | CMake-5dd981539f6b81ad5697df974f309d9a6d4e78c6.zip CMake-5dd981539f6b81ad5697df974f309d9a6d4e78c6.tar.gz CMake-5dd981539f6b81ad5697df974f309d9a6d4e78c6.tar.bz2 |
BinUtils: Avoid llvm-strip versions older than Clang 11
Since commit cf82300a63 (BinUtils: Clarify search logic and make it more
consistent, 2021-05-27, v3.21.0-rc1~119^2~2) we correctly prefer the
more-specific name `llvm-strip` over `strip` when using Clang. However,
`llvm-strip` from Clang versions prior to 11 require extra flags to
strip everything. Until our `install(TARGETS)` logic learns to add
those flags, avoid using older versions of `llvm-strip` by default.
Fixes: #22785
Diffstat (limited to 'Modules/CMakeFindBinUtils.cmake')
-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 27d9131..8e9237a 100644 --- a/Modules/CMakeFindBinUtils.cmake +++ b/Modules/CMakeFindBinUtils.cmake @@ -174,7 +174,10 @@ else() endif() list(PREPEND _CMAKE_AR_NAMES "llvm-ar") list(PREPEND _CMAKE_RANLIB_NAMES "llvm-ranlib") - list(PREPEND _CMAKE_STRIP_NAMES "llvm-strip") + 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. + list(PREPEND _CMAKE_STRIP_NAMES "llvm-strip") + endif() list(PREPEND _CMAKE_NM_NAMES "llvm-nm") if("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_VERSION}" VERSION_GREATER_EQUAL 9) # llvm-objdump versions prior to 9 did not support everything we need. |