[llvm] 093245e - [CMake] Pass llvm-readelf to CMake external builds
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 23 14:16:19 PDT 2021
Author: Petr Hosek
Date: 2021-09-23T14:16:14-07:00
New Revision: 093245ed9ee495146b3478447473ad21ae237cb1
URL: https://github.com/llvm/llvm-project/commit/093245ed9ee495146b3478447473ad21ae237cb1
DIFF: https://github.com/llvm/llvm-project/commit/093245ed9ee495146b3478447473ad21ae237cb1.diff
LOG: [CMake] Pass llvm-readelf to CMake external builds
This matches other LLVM binary tools.
Differential Revision: https://reviews.llvm.org/D110313
Added:
Modified:
llvm/cmake/modules/LLVMExternalProjectUtils.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/LLVMExternalProjectUtils.cmake b/llvm/cmake/modules/LLVMExternalProjectUtils.cmake
index 7c91150ba725b..61f351c98ea44 100644
--- a/llvm/cmake/modules/LLVMExternalProjectUtils.cmake
+++ b/llvm/cmake/modules/LLVMExternalProjectUtils.cmake
@@ -90,7 +90,7 @@ function(llvm_ExternalProject_Add name source_dir)
list(APPEND ARG_TOOLCHAIN_TOOLS llvm-lib)
else()
# TODO: These tools don't fully support Mach-O format yet.
- list(APPEND ARG_TOOLCHAIN_TOOLS llvm-objcopy llvm-strip)
+ list(APPEND ARG_TOOLCHAIN_TOOLS llvm-objcopy llvm-strip llvm-readelf)
endif()
endif()
endif()
@@ -204,6 +204,9 @@ function(llvm_ExternalProject_Add name source_dir)
if(llvm-strip IN_LIST TOOLCHAIN_TOOLS AND NOT ARG_STRIP_TOOL)
list(APPEND compiler_args -DCMAKE_STRIP=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-strip${CMAKE_EXECUTABLE_SUFFIX})
endif()
+ if(llvm-readelf IN_LIST TOOLCHAIN_TOOLS)
+ list(APPEND compiler_args -DCMAKE_READELF=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-readelf${CMAKE_EXECUTABLE_SUFFIX})
+ endif()
list(APPEND ARG_DEPENDS ${TOOLCHAIN_TOOLS})
endif()
More information about the llvm-commits
mailing list