[PATCH] D112275: [AIX] Enable rtl for plugins test

Steven Wan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 21 15:12:14 PDT 2021


stevewan created this revision.
Herald added a subscriber: mgorny.
stevewan requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

On AIX, the plugins are linked with `-WL,-G`, which produces shared objects enabled for use with the run-time linker. This patch sets the run-time
linker at the main executable link step to allow symbols from the plugins shared objects to be properly bound.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112275

Files:
  llvm/unittests/Passes/CMakeLists.txt


Index: llvm/unittests/Passes/CMakeLists.txt
===================================================================
--- llvm/unittests/Passes/CMakeLists.txt
+++ llvm/unittests/Passes/CMakeLists.txt
@@ -12,6 +12,11 @@
 # work with DLLs on Windows (where a shared library can't have undefined
 # references), so just skip this testcase on Windows.
 if (NOT WIN32)
+  # On AIX, enable run-time linking to allow symbols from the plugins shared
+  # objects to be properly bound.
+  if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-brtl")
+  endif()
   set(LLVM_LINK_COMPONENTS Support Passes Core AsmParser)
   add_llvm_unittest(PluginsTests
     PluginsTest.cpp


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112275.381408.patch
Type: text/x-patch
Size: 707 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211021/0e3dcde5/attachment.bin>


More information about the llvm-commits mailing list