[PATCH] D74042: [test] Disable the Passes/PluginsTest cases on windows
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 10 12:55:02 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbc8e44218810: [test] Disable the Passes/PluginsTest cases on windows with BUILD_SHARED_LIBS (authored by mstorsjo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74042/new/
https://reviews.llvm.org/D74042
Files:
llvm/unittests/Passes/CMakeLists.txt
Index: llvm/unittests/Passes/CMakeLists.txt
===================================================================
--- llvm/unittests/Passes/CMakeLists.txt
+++ llvm/unittests/Passes/CMakeLists.txt
@@ -7,24 +7,30 @@
add_definitions(-DLLVM_ENABLE_PLUGINS)
endif()
-set(LLVM_LINK_COMPONENTS Support Passes Core)
-add_llvm_unittest(PluginsTests
- PluginsTest.cpp
- )
-export_executable_symbols(PluginsTests)
-target_link_libraries(PluginsTests PRIVATE LLVMTestingSupport)
+# The plugin expects to not link against the Support and Core libraries,
+# but expects them to exist in the process loading the plugin. This doesn't
+# work with DLLs on Windows (where a shared library can't have undefined
+# references), so just skip this testcase on Windows.
+if (NOT WIN32)
+ set(LLVM_LINK_COMPONENTS Support Passes Core)
+ add_llvm_unittest(PluginsTests
+ PluginsTest.cpp
+ )
+ export_executable_symbols(PluginsTests)
+ target_link_libraries(PluginsTests PRIVATE LLVMTestingSupport)
-set(LLVM_LINK_COMPONENTS)
-add_llvm_library(TestPlugin MODULE BUILDTREE_ONLY
- TestPlugin.cpp
- )
+ set(LLVM_LINK_COMPONENTS)
+ add_llvm_library(TestPlugin MODULE BUILDTREE_ONLY
+ TestPlugin.cpp
+ )
-# Put plugin next to the unit test executable.
-set_output_directory(TestPlugin
- BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
- LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
- )
-set_target_properties(TestPlugin PROPERTIES FOLDER "Tests")
+ # Put plugin next to the unit test executable.
+ set_output_directory(TestPlugin
+ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
+ LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
+ )
+ set_target_properties(TestPlugin PROPERTIES FOLDER "Tests")
-add_dependencies(TestPlugin intrinsics_gen)
-add_dependencies(PluginsTests TestPlugin)
+ add_dependencies(TestPlugin intrinsics_gen)
+ add_dependencies(PluginsTests TestPlugin)
+endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74042.243658.patch
Type: text/x-patch
Size: 1950 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200210/4017e059/attachment.bin>
More information about the llvm-commits
mailing list