diff options
author | Norbert Lange <nolange79@gmail.com> | 2019-07-23 22:06:14 (GMT) |
---|---|---|
committer | Norbert Lange <nolange79@gmail.com> | 2019-07-23 22:06:14 (GMT) |
commit | 5412d6371486ba903474869ed4fad279988f6163 (patch) | |
tree | ab808a3e91a1c87c4022c16b348b7c3de67ca257 /Modules | |
parent | 3a82ef78eb8895016e57758c5ee943270024dbeb (diff) | |
download | CMake-5412d6371486ba903474869ed4fad279988f6163.zip CMake-5412d6371486ba903474869ed4fad279988f6163.tar.gz CMake-5412d6371486ba903474869ed4fad279988f6163.tar.bz2 |
CMakeFindBinUtils: add missing llvm alternatives
LLVM 8.0 already ships with alternatives for all
current Binutils. Enable them.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeFindBinUtils.cmake | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index db183e8..3a7ac2c 100644 --- a/Modules/CMakeFindBinUtils.cmake +++ b/Modules/CMakeFindBinUtils.cmake @@ -84,10 +84,13 @@ else() endif() if("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ID}" STREQUAL Clang) - set(_CMAKE_ADDITIONAL_OBJDUMP_NAMES "llvm-objdump") - set(_CMAKE_ADDITIONAL_LINKER_NAMES "ld.lld") - set(_CMAKE_ADDITIONAL_RANLIB_NAMES "llvm-ranlib") set(_CMAKE_ADDITIONAL_AR_NAMES "llvm-ar") + set(_CMAKE_ADDITIONAL_RANLIB_NAMES "llvm-ranlib") + set(_CMAKE_ADDITIONAL_STRIP_NAMES "llvm-strip") + set(_CMAKE_ADDITIONAL_LINKER_NAMES "ld.lld") + set(_CMAKE_ADDITIONAL_NM_NAMES "llvm-nm") + set(_CMAKE_ADDITIONAL_OBJDUMP_NAMES "llvm-objdump") + set(_CMAKE_ADDITIONAL_OBJCOPY_NAMES "llvm-objcopy") endif() find_program(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar${_CMAKE_TOOLCHAIN_SUFFIX} ${_CMAKE_ADDITIONAL_AR_NAMES} HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) @@ -98,11 +101,11 @@ else() endif() - find_program(CMAKE_STRIP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}strip${_CMAKE_TOOLCHAIN_SUFFIX} HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) + find_program(CMAKE_STRIP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}strip${_CMAKE_TOOLCHAIN_SUFFIX} ${_CMAKE_ADDITIONAL_STRIP_NAMES} HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) find_program(CMAKE_LINKER NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ld ${_CMAKE_ADDITIONAL_LINKER_NAMES} HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) - find_program(CMAKE_NM NAMES ${_CMAKE_TOOLCHAIN_PREFIX}nm HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) + find_program(CMAKE_NM NAMES ${_CMAKE_TOOLCHAIN_PREFIX}nm ${_CMAKE_ADDITIONAL_NM_NAMES} HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) find_program(CMAKE_OBJDUMP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objdump ${_CMAKE_ADDITIONAL_OBJDUMP_NAMES} HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) - find_program(CMAKE_OBJCOPY NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objcopy HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) + find_program(CMAKE_OBJCOPY NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objcopy ${_CMAKE_ADDITIONAL_OBJCOPY_NAMES} HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) list(APPEND _CMAKE_TOOL_VARS AR RANLIB STRIP LINKER NM OBJDUMP OBJCOPY) |