[llvm] 28ef805 - [AIX] Enable rtl for plugins test
Steven Wan via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 22 09:08:43 PDT 2021
Author: Steven Wan
Date: 2021-10-22T12:08:22-04:00
New Revision: 28ef8052d228be819f7bfd03738cee5723b8200f
URL: https://github.com/llvm/llvm-project/commit/28ef8052d228be819f7bfd03738cee5723b8200f
DIFF: https://github.com/llvm/llvm-project/commit/28ef8052d228be819f7bfd03738cee5723b8200f.diff
LOG: [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
Added:
Modified:
llvm/unittests/Passes/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/unittests/Passes/CMakeLists.txt b/llvm/unittests/Passes/CMakeLists.txt
index f9ab51c469daa..a5683cd3741f5 100644
--- a/llvm/unittests/Passes/CMakeLists.txt
+++ b/llvm/unittests/Passes/CMakeLists.txt
@@ -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
More information about the llvm-commits
mailing list