[PATCH] Use a sufficiently current MSVCRT when using MinGW

Reid Kleckner rnk at google.com
Fri Jan 30 14:22:17 PST 2015


The  __MSVCRT_VERSION__ check seems like a nice improvement.

If users are compiling binaries with MSVC, they generally know they have to
either link the CRT statically or redistribute the appropriate CRT DLL. If
I were a mingw64 user, I would not expect that binaries I build will have
dependencies on things other than mingw64 itself and Windows unless I asked
otherwise.

However, maybe it's more important for this to just work out of the box for
developers than it is to worry about people building redistributed
binaries. I just don't like the added build system complexity. =/

On Fri, Jan 30, 2015 at 2:13 PM, Mueller-Roemer, Johannes Sebastian <
Johannes.Sebastian.Mueller-Roemer at igd.fraunhofer.de> wrote:

> But the problem with the dialog box etc. is the same on MinGW as on MSVC.
> And the MSVC executables won't run either if the appropriate runtimes are
> not installed on a target machine.
>
> Maybe as an compromise we could replace the "#ifdef _MSC_VER" now
> disabling it completely by an "#if defined(_MSC_VER) || __MSVCRT_VERSION__
> >= 0x900". I could live with that. Although I'd still prefer a MinGW build
> to work automatically *and* have the no-message feature instead of silently
> disabling the feature.
>
> ________________________________
> From: Reid Kleckner [rnk at google.com]
> Sent: Friday, January 30, 2015 10:30 PM
> To: Mueller-Roemer, Johannes Sebastian
> Cc: reviews+D7224+public+9c618652813cb116 at reviews.llvm.org;
> bigcheesegs at gmail.com; llvm-commits at cs.uiuc.edu
> Subject: Re: [PATCH] Use a sufficiently current MSVCRT when using MinGW
>
> On Fri, Jan 30, 2015 at 1:17 PM, Mueller-Roemer, Johannes Sebastian <
> Johannes.Sebastian.Mueller-Roemer at igd.fraunhofer.de<mailto:
> Johannes.Sebastian.Mueller-Roemer at igd.fraunhofer.de>> wrote:
> I assume you are referring to http://reviews.llvm.org/D7230?
>
> Is it really desirable to disable the functionality for MinGW? Any recent
> MinGW is perfectly capable of compiling it with the right flags. My issue
> was only that running the generated executables requires the corresponding
> runtimes to be installed (also true for MSVC, but if that is installed the
> runtime is automatically installed as well)
>
> I don't like the idea of building mingw64 clang and LLVM executables that
> have surprising runtime dependencies on versions of the CRT that aren't
> shipped with either Windows or mingw64. It makes it very easy to build
> executables that won't run on other machines.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150130/3f9b4c2b/attachment.html>


More information about the llvm-commits mailing list