[vlc-devel] [PATCH] package/win32: build.sh: Force Win7 and MSVCRT when not using UCRT
    Steve Lhomme 
    robux4 at ycbcr.xyz
       
    Tue Jun  2 15:03:50 CEST 2020
    
    
  
On 2020-06-02 12:00, Martin Storsjö wrote:
> On Tue, 2 Jun 2020, Steve Lhomme wrote:
> 
>> That's the minimum we support in VLC 4.0.
>>
>> The CRT version to set for UCRT is 0xE00.
> 
> To select the UCRT, it's enough to just define _URT - you can do either 
I suppose you mean _UCRT.
> that or define __MSVCRT_VERSION__=0xE00, but you don't do both.
OK. I suppose it doesn't hurt though.
When *not* selecting UCRT the selection is done as this:
#ifndef __MSVCRT_VERSION__
/*  High byte is the major version, low byte is the minor. */
# ifndef _UCRT
#  define __MSVCRT_VERSION__ @DEFAULT_MSVCRT_VERSION@
# else
#  define __MSVCRT_VERSION__ 0xE00
# endif
#endif
It seems better to set the __MSVCRT_VERSION__ to make sure that's the 
one we want. So I would rather be consistent in the two modes.
> Switching between msvcrt versions like this, on top of one single 
> toolchain, works as long as you don't rely on other prebuilt libraries 
> that depend on CRT specific details. In particular, the prebuilt libc++ 
> is closely tied to the CRT used, so I'm afraid this approach doesn't 
> work reliably for C++ code - unless you plan on building that as part of 
> the VLC build as well.
I first go into this because the current LLVM-MINGW builds use UCRT (so 
don't run on a simple Win7 machine). I hoped it was possible to switch 
between one another but I feared what you describe.
So I think we should rebuild our LLVM-MINGW toolchain to support msvcrt 
which is what we'll use for Win7 compatibility.
We should probably have a UCRT version on the side as well.
    
    
More information about the vlc-devel
mailing list