Skip to content

Commit e03dd97

Browse files
committed
[AIX] Try to not use LLVM tools while building runtimes
Since 64-bit XCOFF and the big AR format is not yet supported in some of these tools, this patch avoids additional setup of these tools. This patch is not intended to prevent picking up the LLVM tools if they happen to be available otherwise. Reviewed By: hubert.reinterpretcast Differential Revision: https://reviews.llvm.org/D85329
1 parent 8858340 commit e03dd97

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

llvm/runtimes/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,11 @@ ${error} Set RUNTIMES_BUILD_ALLOW_DARWIN to allow a single darwin triple.")
298298
endif()
299299
endforeach()
300300

301+
# 64-bit XCOFF and big AR format is not yet supported in some of these tools.
302+
if(NOT target MATCHES aix)
303+
set(${target}_toolchain_tools lld llvm-ar llvm-lipo llvm-ranlib llvm-nm llvm-objcopy llvm-objdump llvm-strip)
304+
endif()
305+
301306
llvm_ExternalProject_Add(builtins-${target}
302307
${compiler_rt_path}/lib/builtins
303308
DEPENDS ${ARG_DEPENDS}
@@ -311,6 +316,7 @@ ${error} Set RUNTIMES_BUILD_ALLOW_DARWIN to allow a single darwin triple.")
311316
-DCMAKE_ASM_COMPILER_WORKS=ON
312317
-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
313318
${${target}_extra_args}
319+
TOOLCHAIN_TOOLS clang ${${target}_toolchain_tools}
314320
USE_TOOLCHAIN
315321
${EXTRA_ARGS})
316322
endfunction()
@@ -518,6 +524,11 @@ ${error} Set RUNTIMES_BUILD_ALLOW_DARWIN to allow a single darwin triple.")
518524
list(APPEND EXTRA_ARGS STRIP_TOOL ${CMAKE_CURRENT_BINARY_DIR}/llvm-strip-link)
519525
endif()
520526

527+
# 64-bit XCOFF and big AR format is not yet supported in some of these tools.
528+
if(NOT target MATCHES aix)
529+
set(${name}_toolchain_tools lld llvm-ar llvm-lipo llvm-ranlib llvm-nm llvm-objcopy llvm-objdump llvm-strip)
530+
endif()
531+
521532
llvm_ExternalProject_Add(runtimes-${name}
522533
${CMAKE_CURRENT_SOURCE_DIR}
523534
DEPENDS ${${name}_deps} ${CXX_HEADER_TARGET}
@@ -536,6 +547,7 @@ ${error} Set RUNTIMES_BUILD_ALLOW_DARWIN to allow a single darwin triple.")
536547
-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
537548
-DLLVM_RUNTIMES_TARGET=${name}
538549
${${name}_extra_args}
550+
TOOLCHAIN_TOOLS clang ${${name}_toolchain_tools}
539551
EXTRA_TARGETS ${${name}_extra_targets}
540552
${${name}_test_targets}
541553
USE_TOOLCHAIN

0 commit comments

Comments
 (0)