[PATCH] D88169: [CMake][AIX] Set LLVM_ENABLE_PER_TARGET_RUNTIME_DIR appropriately for AIX
David Tenty via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 23 10:22:04 PDT 2020
daltenty created this revision.
daltenty added reviewers: stevewan, hubert.reinterpretcast, jasonliu.
Herald added subscribers: llvm-commits, mgorny.
Herald added a project: LLVM.
daltenty requested review of this revision.
AIX by default usually folds 32-bit & 64-bit arch libraries into a single
archive, a behaviour we may want for the runtime libraries in the future,
so we don't necessarily want to opt into the multlib layout introduce in
D45604 <https://reviews.llvm.org/D45604>, which is currently the default for runtime builds.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D88169
Files:
llvm/runtimes/CMakeLists.txt
Index: llvm/runtimes/CMakeLists.txt
===================================================================
--- llvm/runtimes/CMakeLists.txt
+++ llvm/runtimes/CMakeLists.txt
@@ -260,13 +260,18 @@
function(builtin_default_target compiler_rt_path)
cmake_parse_arguments(ARG "" "" "DEPENDS" ${ARGN})
+ set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default ON)
+ if (TARGET_TRIPLE MATCHES "aix")
+ set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default OFF)
+ endif()
+
llvm_ExternalProject_Add(builtins
${compiler_rt_path}/lib/builtins
DEPENDS ${ARG_DEPENDS}
CMAKE_ARGS -DLLVM_LIBRARY_OUTPUT_INTDIR=${LLVM_LIBRARY_DIR}
-DLLVM_RUNTIME_OUTPUT_INTDIR=${LLVM_TOOLS_BINARY_DIR}
-DLLVM_DEFAULT_TARGET_TRIPLE=${TARGET_TRIPLE}
- -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=${LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default}
-DCMAKE_C_COMPILER_TARGET=${TARGET_TRIPLE}
-DCMAKE_ASM_COMPILER_TARGET=${TARGET_TRIPLE}
-DCMAKE_C_COMPILER_WORKS=ON
@@ -400,6 +405,12 @@
list(APPEND test_targets runtimes-test-depends check-runtimes)
endif()
+ # AIX folds 32-bit & 64-bit arch libraries into a single archive.
+ set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default ON)
+ if (TARGET_TRIPLE MATCHES "aix")
+ set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default OFF)
+ endif()
+
llvm_ExternalProject_Add(runtimes
${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${ARG_DEPENDS} ${CXX_HEADER_TARGET}
@@ -408,7 +419,7 @@
-DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS}
-DLLVM_DEFAULT_TARGET_TRIPLE=${TARGET_TRIPLE}
-DLLVM_ENABLE_PROJECTS_USED=${LLVM_ENABLE_PROJECTS_USED}
- -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=${LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default}
-DCMAKE_C_COMPILER_TARGET=${TARGET_TRIPLE}
-DCMAKE_CXX_COMPILER_TARGET=${TARGET_TRIPLE}
-DCMAKE_ASM_COMPILER_TARGET=${TARGET_TRIPLE}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88169.293791.patch
Type: text/x-patch
Size: 2608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200923/7116082a/attachment.bin>
More information about the llvm-commits
mailing list