[Windows][Polly] Disable LLVMPolly module for all compilers on Windows

Before this patch, the cmake disabled loadable modules when compiling
with Visual Studio. However, the reason for this is a limitation of the
Windows DLLs, thus this restriction should apply to any compiler for the
Windows platform, such as MinGW, Cygwin, icc, etc.

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

GitOrigin-RevId: e71cda21d71c4c92731ec7fe8345d04395a630b7
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index fd8028a..7cc129b 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -10,7 +10,7 @@
 endif()
 
 set(POLLY_CONFIG_EXPORTED_TARGETS Polly ${ISL_TARGET})
-if (NOT MSVC AND LLVM_ENABLE_PIC)
+if (NOT WIN32 AND LLVM_ENABLE_PIC)
   # LLVMPolly is a dummy target on Win or if PIC code is disabled.
   list(APPEND POLLY_CONFIG_EXPORTED_TARGETS LLVMPolly)
 endif()
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 113ae5f..b20358e 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -137,7 +137,7 @@
 
 # Create a loadable module Polly.so that can be loaded using
 # LLVM's/clang's "-load" option.
-if (MSVC OR NOT LLVM_ENABLE_PIC)
+if (WIN32 OR NOT LLVM_ENABLE_PIC)
   # Add dummy target, either because loadable modules are not supported
   # as on Windows or because PIC code has been disabled
   add_custom_target(LLVMPolly)