[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
This commit is contained in:
Steven Wan 2021-10-22 12:07:57 -04:00
parent ce7b8343be
commit 28ef8052d2
1 changed files with 5 additions and 0 deletions

View File

@ -12,6 +12,11 @@ endif()
# 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