Index: clang/test/Analysis/plugins/CheckerDependencyHandling/CMakeLists.txt =================================================================== --- clang/test/Analysis/plugins/CheckerDependencyHandling/CMakeLists.txt +++ clang/test/Analysis/plugins/CheckerDependencyHandling/CMakeLists.txt @@ -1,11 +1,12 @@ set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/CheckerDependencyHandlingAnalyzerPlugin.exports) add_llvm_library(CheckerDependencyHandlingAnalyzerPlugin MODULE CheckerDependencyHandling.cpp PLUGIN_TOOL clang) -if(LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN)) +if(LLVM_ENABLE_PLUGINS) target_link_libraries(CheckerDependencyHandlingAnalyzerPlugin PRIVATE clangAnalysis clangAST clangStaticAnalyzerCore + clangStaticAnalyzerFrontend LLVMSupport ) endif() Index: clang/test/Analysis/plugins/CheckerOptionHandling/CMakeLists.txt =================================================================== --- clang/test/Analysis/plugins/CheckerOptionHandling/CMakeLists.txt +++ clang/test/Analysis/plugins/CheckerOptionHandling/CMakeLists.txt @@ -1,11 +1,12 @@ set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/CheckerOptionHandlingAnalyzerPlugin.exports) add_llvm_library(CheckerOptionHandlingAnalyzerPlugin MODULE CheckerOptionHandling.cpp PLUGIN_TOOL clang) -if(LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN)) +if(LLVM_ENABLE_PLUGINS) target_link_libraries(CheckerOptionHandlingAnalyzerPlugin PRIVATE clangAnalysis clangAST clangStaticAnalyzerCore + clangStaticAnalyzerFrontend LLVMSupport ) endif() Index: clang/test/Analysis/plugins/SampleAnalyzer/CMakeLists.txt =================================================================== --- clang/test/Analysis/plugins/SampleAnalyzer/CMakeLists.txt +++ clang/test/Analysis/plugins/SampleAnalyzer/CMakeLists.txt @@ -1,11 +1,12 @@ set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/SampleAnalyzerPlugin.exports) add_llvm_library(SampleAnalyzerPlugin MODULE MainCallChecker.cpp PLUGIN_TOOL clang) -if(LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN)) +if(LLVM_ENABLE_PLUGINS) target_link_libraries(SampleAnalyzerPlugin PRIVATE clangAnalysis clangAST clangStaticAnalyzerCore + clangStaticAnalyzerFrontend LLVMSupport ) endif() Index: llvm/cmake/modules/HandleLLVMOptions.cmake =================================================================== --- llvm/cmake/modules/HandleLLVMOptions.cmake +++ llvm/cmake/modules/HandleLLVMOptions.cmake @@ -920,10 +920,14 @@ # Plugin support # FIXME: Make this configurable. -if(BUILD_SHARED_LIBS OR LLVM_BUILD_LLVM_DYLIB) - set(LLVM_ENABLE_PLUGINS ON) +if(WIN32 OR CYGWIN) + if(BUILD_SHARED_LIBS OR LLVM_BUILD_LLVM_DYLIB) + set(LLVM_ENABLE_PLUGINS ON) + else() + set(LLVM_ENABLE_PLUGINS OFF) + endif() else() - set(LLVM_ENABLE_PLUGINS OFF) + set(LLVM_ENABLE_PLUGINS ON) endif() # By default we should enable LLVM_ENABLE_IDE only for multi-configuration