[PATCH] D104908: [AIX][compiler-rt] Deliver libatomic.a at top level library directory
Kai Luo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 28 20:14:43 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGae79854e1c59: [AIX][compiler-rt] Deliver libatomic.a at top level library directory (authored by lkail).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104908/new/
https://reviews.llvm.org/D104908
Files:
compiler-rt/cmake/Modules/CompilerRTAIXUtils.cmake
Index: compiler-rt/cmake/Modules/CompilerRTAIXUtils.cmake
===================================================================
--- compiler-rt/cmake/Modules/CompilerRTAIXUtils.cmake
+++ compiler-rt/cmake/Modules/CompilerRTAIXUtils.cmake
@@ -57,8 +57,16 @@
if(shared_libraries_to_archive)
set(output_dir "")
set(install_dir "")
- get_compiler_rt_output_dir(${COMPILER_RT_DEFAULT_TARGET_ARCH} output_dir)
- get_compiler_rt_install_dir(${COMPILER_RT_DEFAULT_TARGET_ARCH} install_dir)
+ # If LLVM defines top level library directory, we want to deliver
+ # libatomic.a at top level. See `llvm/cmake/modules/AddLLVM.cmake'
+ # setting _install_rpath on AIX for reference.
+ if(LLVM_LIBRARY_OUTPUT_INTDIR AND CMAKE_INSTALL_PREFIX)
+ set(output_dir "${LLVM_LIBRARY_OUTPUT_INTDIR}")
+ set(install_dir "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}")
+ else()
+ get_compiler_rt_output_dir(${COMPILER_RT_DEFAULT_TARGET_ARCH} output_dir)
+ get_compiler_rt_install_dir(${COMPILER_RT_DEFAULT_TARGET_ARCH} install_dir)
+ endif()
add_custom_command(OUTPUT "${output_dir}/libatomic.a"
COMMAND ${CMAKE_AR} -X32_64 r "${output_dir}/libatomic.a"
${shared_libraries_to_archive}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104908.355101.patch
Type: text/x-patch
Size: 1270 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210629/d631bda0/attachment.bin>
More information about the llvm-commits
mailing list