]> granicus.if.org Git - clang/commitdiff
Don't use MSVC Setup Api on MinGW.
authorZachary Turner <zturner@google.com>
Wed, 15 Mar 2017 17:09:36 +0000 (17:09 +0000)
committerZachary Turner <zturner@google.com>
Wed, 15 Mar 2017 17:09:36 +0000 (17:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297861 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains/MSVC.cpp

index ce8e1b2b600d294535b74e15e2642cf44c1cd2a5..3d7c1d76ae76ea0c9272c3cec9f6791945fce202 100644 (file)
     #define NOMINMAX
   #endif
   #include <windows.h>
+#endif
+
+#ifdef _MSC_VER
+// Don't support SetupApi on MinGW.
+#define USE_MSVC_SETUP_API
 
 // Make sure this comes before MSVCSetupApi.h
 #include <comdef.h>
@@ -170,7 +175,7 @@ static bool findVCToolChainViaEnvironment(std::string &Path,
 // longer listed in the registry.
 static bool findVCToolChainViaSetupConfig(std::string &Path,
                                           bool &IsVS2017OrNewer) {
-#if !defined(USE_WIN32)
+#if !defined(USE_MSVC_SETUP_API)
   return false;
 #else
   // FIXME: This really should be done once in the top-level program's main