From 50dd75c8e0b81815c6da209d5a3dd7bf899d1262 Mon Sep 17 00:00:00 2001 From: David Tenty Date: Mon, 10 Aug 2020 16:07:23 -0400 Subject: [PATCH] [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 --- llvm/runtimes/CMakeLists.txt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt index dc74a46..8f5815e 100644 --- a/llvm/runtimes/CMakeLists.txt +++ b/llvm/runtimes/CMakeLists.txt @@ -274,6 +274,11 @@ else() # if this is included from LLVM's CMake endif() endforeach() + # 64-bit XCOFF and big AR format is not yet supported in some of these tools. + if(NOT target MATCHES aix) + set(${target}_toolchain_tools lld llvm-ar llvm-lipo llvm-ranlib llvm-nm llvm-objcopy llvm-objdump llvm-strip) + endif() + llvm_ExternalProject_Add(builtins-${target} ${compiler_rt_path}/lib/builtins DEPENDS ${ARG_DEPENDS} @@ -287,7 +292,7 @@ else() # if this is included from LLVM's CMake -DCMAKE_ASM_COMPILER_WORKS=ON -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON ${${target}_extra_args} - TOOLCHAIN_TOOLS clang lld llvm-ar llvm-lipo llvm-ranlib llvm-nm llvm-objcopy llvm-objdump llvm-strip + TOOLCHAIN_TOOLS clang ${target}_toolchain_tools USE_TOOLCHAIN ${EXTRA_ARGS}) endfunction() @@ -487,6 +492,11 @@ else() # if this is included from LLVM's CMake list(APPEND EXTRA_ARGS STRIP_TOOL ${CMAKE_CURRENT_BINARY_DIR}/llvm-strip-link) endif() + # 64-bit XCOFF and big AR format is not yet supported in some of these tools. + if(NOT target MATCHES aix) + set(${name}_toolchain_tools lld llvm-ar llvm-lipo llvm-ranlib llvm-nm llvm-objcopy llvm-objdump llvm-strip) + endif() + llvm_ExternalProject_Add(runtimes-${name} ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${${name}_deps} ${CXX_HEADER_TARGET} @@ -505,7 +515,7 @@ else() # if this is included from LLVM's CMake -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON -DLLVM_RUNTIMES_TARGET=${name} ${${name}_extra_args} - TOOLCHAIN_TOOLS clang lld llvm-ar llvm-lipo llvm-ranlib llvm-nm llvm-objcopy llvm-objdump llvm-strip + TOOLCHAIN_TOOLS clang ${{name}_toolchain_tools} EXTRA_TARGETS ${${name}_extra_targets} ${${name}_test_targets} USE_TOOLCHAIN -- 2.7.4