summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorArkadiusz Skalski <askalski85@gmail.com>2024-02-06 09:52:42 (GMT)
committerBrad King <brad.king@kitware.com>2024-02-06 14:06:37 (GMT)
commit053c2b3646eec44ec4d2d30f45a2c7d7b05e31ef (patch)
tree7b31b79c1156e649c56b9bbffe1f1f25e914c38e /Modules
parent908b4ba54d6cac42821349b5b2a684e05d28df88 (diff)
downloadCMake-053c2b3646eec44ec4d2d30f45a2c7d7b05e31ef.zip
CMake-053c2b3646eec44ec4d2d30f45a2c7d7b05e31ef.tar.gz
CMake-053c2b3646eec44ec4d2d30f45a2c7d7b05e31ef.tar.bz2
BinUtils: Avoid llvm-objcopy versions older than Clang 9
Prior to version 9.0, llvm-objcopy is missing the `--only-keep-debug` option, which makes it incompatible with the GNU objcopy.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeFindBinUtils.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake
index cf270c0..5e85440 100644
--- a/Modules/CMakeFindBinUtils.cmake
+++ b/Modules/CMakeFindBinUtils.cmake
@@ -204,10 +204,10 @@ else()
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.
+ # llvm-objcopy and llvm-objdump on versions prior to 9 did not support everything we need.
+ list(PREPEND _CMAKE_OBJCOPY_NAMES "llvm-objcopy")
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")
list(PREPEND _CMAKE_ADDR2LINE_NAMES "llvm-addr2line")