r297861 - Don't use MSVC Setup Api on MinGW.

Zachary Turner via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 15 10:09:37 PDT 2017


Author: zturner
Date: Wed Mar 15 12:09:36 2017
New Revision: 297861

URL: http://llvm.org/viewvc/llvm-project?rev=297861&view=rev
Log:
Don't use MSVC Setup Api on MinGW.

Modified:
    cfe/trunk/lib/Driver/ToolChains/MSVC.cpp

Modified: cfe/trunk/lib/Driver/ToolChains/MSVC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/MSVC.cpp?rev=297861&r1=297860&r2=297861&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/MSVC.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/MSVC.cpp Wed Mar 15 12:09:36 2017
@@ -44,6 +44,11 @@
     #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 findVCToolChainViaEnvironmen
 // 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




More information about the cfe-commits mailing list