In the debug info, thread local variables, whether they're at module, class, or function scope should have record types of S_LTHREAD32 and S_GTHREAD32. Right now they're stored as shared globals using the record type S_GDATA32.
Comment #1 by r.sagitario — 2011-10-06T00:32:51Z
I've patched dmd to emit these records correctly, but they are removed by optlink when creating the executable.
Comment #2 by r.sagitario — 2019-08-20T22:00:45Z
OMF compiler output looks ok, but optlink screws it.
Building COFF and linking with the MS linker is ok.
Comment #3 by robert.schadek — 2024-12-13T17:53:15Z