[clang] [Clang][MSVC] Avoid native CRT TLS accesses with emulated TLS (PR #220215)

Lang Hames via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 16 03:30:47 PDT 2026


lhames wrote:

We chose emulated TLS back before the JIT supported any native TLS models.

On Darwin native TLS is now supported. On ELF platforms we support some TLS models, but not all of them. I've never looked at COFF native TLS support.

Ideally we'd support the native model, but that seems a ways off at this point. I'd welcome emulated TLS for COFF as a stop-gap, but this doesn't look like it goes that far.

@Sp0tless -- what's the failure mode today? If you're getting unresolved symbols, could we implement those symbols within the JIT to recover the behaviour that we want?

https://github.com/llvm/llvm-project/pull/220215


More information about the cfe-commits mailing list