[PATCH] D110463: [CMake] Pass through CMAKE_READELF to subbuilds

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 24 18:00:19 PDT 2021


phosek created this revision.
phosek added a reviewer: leonardchan.
Herald added a subscriber: mgorny.
phosek requested review of this revision.
Herald added projects: clang, Sanitizers, LLVM.
Herald added subscribers: llvm-commits, Sanitizers, cfe-commits.

This matches handling of other CMake variables.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D110463

Files:
  clang/CMakeLists.txt
  compiler-rt/cmake/Modules/AddCompilerRT.cmake
  llvm/cmake/modules/LLVMExternalProjectUtils.cmake


Index: llvm/cmake/modules/LLVMExternalProjectUtils.cmake
===================================================================
--- llvm/cmake/modules/LLVMExternalProjectUtils.cmake
+++ llvm/cmake/modules/LLVMExternalProjectUtils.cmake
@@ -244,7 +244,8 @@
                       -DCMAKE_NM=${CMAKE_NM}
                       -DCMAKE_OBJCOPY=${CMAKE_OBJCOPY}
                       -DCMAKE_OBJDUMP=${CMAKE_OBJDUMP}
-                      -DCMAKE_STRIP=${CMAKE_STRIP})
+                      -DCMAKE_STRIP=${CMAKE_STRIP}
+                      -DCMAKE_READELF=${CMAKE_READELF})
     set(llvm_config_path ${LLVM_CONFIG_PATH})
 
     if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
Index: compiler-rt/cmake/Modules/AddCompilerRT.cmake
===================================================================
--- compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ compiler-rt/cmake/Modules/AddCompilerRT.cmake
@@ -598,6 +598,7 @@
     CMAKE_OBJCOPY
     CMAKE_OBJDUMP
     CMAKE_STRIP
+    CMAKE_READELF
     CMAKE_SYSROOT
     LIBCXX_HAS_MUSL_LIBC
     PYTHON_EXECUTABLE
Index: clang/CMakeLists.txt
===================================================================
--- clang/CMakeLists.txt
+++ clang/CMakeLists.txt
@@ -759,6 +759,7 @@
       add_dependencies(clang-bootstrap-deps llvm-objcopy llvm-strip)
       set(${CLANG_STAGE}_OBJCOPY -DCMAKE_OBJCOPY=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-objcopy)
       set(${CLANG_STAGE}_STRIP -DCMAKE_STRIP=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-strip)
+      set(${CLANG_STAGE}_READELF -DCMAKE_READELF=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-readelf)
     endif()
   endif()
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110463.375003.patch
Type: text/x-patch
Size: 1590 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210925/ff12091f/attachment.bin>


More information about the cfe-commits mailing list