[llvm] 1106644 - [AIX][CMake] Use top-level tools in llvm_ExternalProject_Add
David Tenty via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 30 13:58:39 PST 2023
Author: David Tenty
Date: 2023-01-30T16:55:09-05:00
New Revision: 11066449d49e20f18f46757df07455c6abcedcf1
URL: https://github.com/llvm/llvm-project/commit/11066449d49e20f18f46757df07455c6abcedcf1
DIFF: https://github.com/llvm/llvm-project/commit/11066449d49e20f18f46757df07455c6abcedcf1.diff
LOG: [AIX][CMake] Use top-level tools in llvm_ExternalProject_Add
This change force us to use the top-level CMake's detected 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).
llvm-ranlib runs into problems on AIX 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.
Differential Revision: https://reviews.llvm.org/D142727
Added:
Modified:
llvm/cmake/modules/LLVMExternalProjectUtils.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/LLVMExternalProjectUtils.cmake b/llvm/cmake/modules/LLVMExternalProjectUtils.cmake
index d760eee07958d..120462b57466e 100644
--- a/llvm/cmake/modules/LLVMExternalProjectUtils.cmake
+++ b/llvm/cmake/modules/LLVMExternalProjectUtils.cmake
@@ -239,7 +239,7 @@ function(llvm_ExternalProject_Add name source_dir)
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}
@@ -251,6 +251,8 @@ function(llvm_ExternalProject_Add name source_dir)
-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")
More information about the llvm-commits
mailing list