On Sun, 4 Oct 2026, Pali Rohár wrote:

msvc already provides C11 threads.h support via its own header file and
runtime library vcruntime140_threads.dll (available for x86, amd64 and
arm64; but not for arm32). This library is part of the Visual C++ 2022
redistributable package version 14.38.32919.0.

I would prefer to not go in this direction.

One main feature of the CRTs we primarily use (msvcrt, UCRT) is that they are shipped as part of the OS - this doesn't hold for the separate Microsoft redistributables.

This distinction is important for user code that is strictly GPL, regarding what non-opensource libraries you can link them against. (I.e., OS provided closed source is ok, separately distributed closed source is not ok.)

I think that for future, mingw-w64 could provide own implementations of
C11 threads.h functions (for static linking) compatible with the msvc
runtime functions. I have checked if there is a wine implementation or
documentation, but wine project has not documented this yet.

Yes, having something of our own would feel more in the right direction.

On the other hand, making it possible to use the MSVC thread library might be something that adds value for someone still, but separate alternatives would need to coexist in the same threads.h header though. I wouldn't want the setup that relies on vcruntime140_threads.dll to be the default.

// Martin

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to