Re:Zig: Drop MinGW-w64
by ChrisSD on Sunday December 19, 2021 @04:20PM
(#29618539)
While you're here, do you happen to know if mingw will gain support for native thread local storage? Emulated TLS is still the only option, right?
[ Parent
| on HN ]
Clang (and lld) do support native TLS, and mingw-w64 does have the things that are needed. I think binutils also might have what's needed too, but AFAIK the thing that's missing is support for it in GCC.
Actually, (upstream) Clang defaults to native TLS instead of emulated TLS. In MSYS2, Clang is overridden to use emulated TLS by deafult to interoperate better with GCC built code and libstdc++ though.
The toolchain I maintain, https://github.com/mstorsjo/llvm-mingw, defaults to native TLS throughout.
Thanks! That's super helpful.
Oh, I forgot to add; these days, msys2 have got a number of extra package repos. They have one, "CLANG64", which has got Clang/lld as the default compiler (just like in llvm-mingw) and with all packages built that way. And there, it defaults to native TLS too. Depending on your use case, this might be easier to take for a spin than llvm-mingw.