[PATCH] D142727: [AIX][CMake] Use top-level tools in llvm_ExternalProject_Add
David Tenty via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 27 07:56:08 PST 2023
daltenty created this revision.
daltenty added reviewers: hubert.reinterpretcast, DiggerLin, Jake-Egan.
Herald added a project: All.
daltenty requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This change force us to use the top-level CMake's detect tools. We need to do this as a temporary workaround as when using CMake versions >= 3.22 we'll pickup the built llvm-ranlib by default if it's in the path (which it is when doing a sub build via llvm_ExternalProject_Add for the runtimes), but llvm-ran runs into problems due to missing 64-bit functionality to be added by https://reviews.llvm.org/D142479 and https://reviews.llvm.org/D142660. Once those patches land, this can be reverted.
https://reviews.llvm.org/D142727
Files:
llvm/cmake/modules/LLVMExternalProjectUtils.cmake
Index: llvm/cmake/modules/LLVMExternalProjectUtils.cmake
===================================================================
--- llvm/cmake/modules/LLVMExternalProjectUtils.cmake
+++ llvm/cmake/modules/LLVMExternalProjectUtils.cmake
@@ -240,7 +240,7 @@
set(sysroot_arg -DCMAKE_SYSROOT=${CMAKE_SYSROOT})
endif()
- if(CMAKE_CROSSCOMPILING)
+ if(CMAKE_CROSSCOMPILING OR _cmake_system_name STREQUAL AIX)
set(compiler_args -DCMAKE_ASM_COMPILER=${CMAKE_ASM_COMPILER}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
@@ -252,6 +252,8 @@
-DCMAKE_OBJDUMP=${CMAKE_OBJDUMP}
-DCMAKE_STRIP=${CMAKE_STRIP}
-DCMAKE_READELF=${CMAKE_READELF})
+ endif()
+ if(CMAKE_CROSSCOMPILING)
set(llvm_config_path ${LLVM_CONFIG_PATH})
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142727.492757.patch
Type: text/x-patch
Size: 926 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230127/7acfc506/attachment.bin>
More information about the llvm-commits
mailing list