[PATCH] D97588: [AIX] Disable $ORIGIN rpath
David Tenty via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 26 15:01:26 PST 2021
daltenty created this revision.
daltenty added reviewers: xingxue, jasonliu, stevewan.
Herald added a subscriber: mgorny.
daltenty requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The AIX loader doesn't support relative libpaths, so this mechanism
doesn't work and just messes up the resulting libpath. Also make sure
BUILD_WITH_INSTALL_RPATH is set, since we can't change the rpath on
install.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D97588
Files:
llvm/cmake/modules/AddLLVM.cmake
Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -2105,6 +2105,11 @@
if (APPLE)
set(_install_name_dir INSTALL_NAME_DIR "@rpath")
set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+ elseif(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
+ # $ORIGIN isn't supported by the AIX loader. Also, their isn't support for
+ # required for different build/install rpaths in some of the build tools.
+ set_property(TARGET ${name} PROPERTY BUILD_WITH_INSTALL_RPATH ON)
+ return()
elseif(UNIX)
set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97588.326814.patch
Type: text/x-patch
Size: 803 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210226/12b034b8/attachment.bin>
More information about the llvm-commits
mailing list