Index: llvm/unittests/Passes/CMakeLists.txt =================================================================== --- llvm/unittests/Passes/CMakeLists.txt +++ llvm/unittests/Passes/CMakeLists.txt @@ -7,6 +7,15 @@ add_definitions(-DLLVM_ENABLE_PLUGINS) endif() +# The plugin expects to not link against the Support and Core libraries +# (otherwise there are multiple definitions of the same command line option +# in the binary), 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 in such configurations. +if (WIN32 AND BUILD_SHARED_LIBS) + return() +endif() + set(LLVM_LINK_COMPONENTS Support Passes Core) add_llvm_unittest(PluginsTests PluginsTest.cpp