diff options
author | Brad King <brad.king@kitware.com> | 2021-05-29 12:07:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-05-29 12:09:46 (GMT) |
commit | 9411766c352bd7096b9dc286d8763b8236645756 (patch) | |
tree | 3c7c58d16850d0ba19cde7b912e92a0f4ed70a32 /Modules | |
parent | 7676e11943a6446e3cdc60370a37e4ce9cc548d3 (diff) | |
download | CMake-9411766c352bd7096b9dc286d8763b8236645756.zip CMake-9411766c352bd7096b9dc286d8763b8236645756.tar.gz CMake-9411766c352bd7096b9dc286d8763b8236645756.tar.bz2 |
BinUtils: Avoid llvm-objdump versions older than Clang 9
Since commit cf82300a63 (BinUtils: Clarify search logic and make it more
consistent, 2021-05-27) we correctly prefer the more-specific name
`llvm-objdump` over `objdump` when using Clang. However, this breaks
`file(GET_RUNTIME_DEPENDENCIES)` with `llvm-objdump` from Clang 8 and
below. Avoid those older versions of `llvm-objdump`.
Diffstat (limited to 'Modules')
-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 9dac4a9..ec6bc8d 100644 --- a/Modules/CMakeFindBinUtils.cmake +++ b/Modules/CMakeFindBinUtils.cmake @@ -126,7 +126,10 @@ else() list(PREPEND _CMAKE_RANLIB_NAMES "llvm-ranlib") list(PREPEND _CMAKE_STRIP_NAMES "llvm-strip") list(PREPEND _CMAKE_NM_NAMES "llvm-nm") - list(PREPEND _CMAKE_OBJDUMP_NAMES "llvm-objdump") + if("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_VERSION}" VERSION_GREATER_EQUAL 9) + # llvm-objdump versions prior to 9 did not support everything we need. + list(PREPEND _CMAKE_OBJDUMP_NAMES "llvm-objdump") + endif() list(PREPEND _CMAKE_OBJCOPY_NAMES "llvm-objcopy") list(PREPEND _CMAKE_READELF_NAMES "llvm-readelf") list(PREPEND _CMAKE_DLLTOOL_NAMES "llvm-dlltool") |