OSDN Git Service

[Unittests] Fix plugins test
authorMikhail Maltsev <mikhail.maltsev@arm.com>
Thu, 19 Apr 2018 14:02:46 +0000 (14:02 +0000)
committerMikhail Maltsev <mikhail.maltsev@arm.com>
Thu, 19 Apr 2018 14:02:46 +0000 (14:02 +0000)
Summary:
Currently the PluginsTests.LoadPlugin unit test is failing in
LLVM configurations that have LLVM_EXPORT_SYMBOLS_FOR_PLUGINS enabled
because the EnableABIBreakingChecks symbol is missing.

This patch fixes the issue by linking some additional libraries to the
test plugin if LLVM_EXPORT_SYMBOLS_FOR_PLUGINS is enabled.

Reviewers: philip.pfaffe

Reviewed By: philip.pfaffe

Subscribers: mgorny, llvm-commits, rogfer01

Differential Revision: https://reviews.llvm.org/D45811

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330329 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Passes/CMakeLists.txt

index 7376db3..a64f809 100644 (file)
@@ -16,7 +16,7 @@ if (LLVM_ENABLE_PLUGINS)
     SUFFIX ".so"
     )
 
-  if (WIN32 OR CYGWIN)
+  if (WIN32 OR CYGWIN OR LLVM_EXPORT_SYMBOLS_FOR_PLUGINS)
     llvm_map_components_to_libnames(LLVM_DEPS ${LLVM_LINK_COMPONENTS})
     target_link_libraries(TestPlugin ${LLVM_DEPS})
   endif()