[PATCH] D148866: [CMake][AIX] Fixing AIX rpath

Qiongsi Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 21 06:48:18 PDT 2023


qiongsiwu1 updated this revision to Diff 515719.
qiongsiwu1 added a comment.

Addressing review comment.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148866/new/

https://reviews.llvm.org/D148866

Files:
  llvm/cmake/modules/AddLLVM.cmake


Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -2355,9 +2355,12 @@
   endif()
 
   # Enable BUILD_WITH_INSTALL_RPATH unless CMAKE_BUILD_RPATH is set and not
-  # building for macOS or Windows, as those two platforms seemingly require it.
+  # building for macOS, Windows or AIX, as those three platforms seemingly
+  # require it.
+  # On AIX, the tool chain doesn't support modifying rpaths/libpaths for XCOFF
+  # on install at the moment, so BUILD_WITH_INSTALL_RPATH is required.
   if("${CMAKE_BUILD_RPATH}" STREQUAL "")
-    if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin|Windows")
+    if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin|Windows|AIX")
       set_property(TARGET ${name} PROPERTY BUILD_WITH_INSTALL_RPATH ON)
     else()
       set_property(TARGET ${name} APPEND PROPERTY BUILD_RPATH "${_build_rpath}")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148866.515719.patch
Type: text/x-patch
Size: 944 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230421/f7452f71/attachment.bin>


More information about the llvm-commits mailing list