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

Zachary Turner via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 16 08:46:29 PDT 2017


Pretty sure It's the latter. I don't use MinGW enough enough to know how
compatible it is with msvc, but this uses a bunch of COM APIs and funny
Microsoftisms like declspec(novtable), declspec(uuid), etc, and the MinGW
bot was throwing hundreds of compiler errors. If there's a way to make it
work I'm happy to try
On Thu, Mar 16, 2017 at 8:23 AM Nico Weber <thakis at chromium.org> wrote:

> Should this be a compile-time thing? I thought in general we try to make
> clang-built-with-msvc and clang-built-with-mingw behave roughly the same
> except for a different default triple, i.e. maybe this should be keyed off
> the triple at runtime instead of with a compile-time ifdef. Or do some of
> the APIs the 2017 path calls not exist in mingw?
>
> On Wed, Mar 15, 2017 at 1:09 PM, Zachary Turner via cfe-commits <
> cfe-commits at lists.llvm.org> wrote:
>
> 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
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170316/389a4c0c/attachment.html>


More information about the cfe-commits mailing list