diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake --- a/llvm/cmake/modules/HandleLLVMOptions.cmake +++ b/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