Skip to content

Commit 28ef805

Browse files
committed
[AIX] Enable rtl for plugins test
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. Reviewed By: daltenty Differential Revision: https://reviews.llvm.org/D112275
1 parent ce7b834 commit 28ef805

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/unittests/Passes/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ endif()
1212
# work with DLLs on Windows (where a shared library can't have undefined
1313
# references), so just skip this testcase on Windows.
1414
if (NOT WIN32)
15+
# On AIX, enable run-time linking to allow symbols from the plugins shared
16+
# objects to be properly bound.
17+
if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
18+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-brtl")
19+
endif()
1520
set(LLVM_LINK_COMPONENTS Support Passes Core AsmParser)
1621
add_llvm_unittest(PluginsTests
1722
PluginsTest.cpp

0 commit comments

Comments
 (0)