This is an archive of the discontinued LLVM Phabricator instance.

TLS for MinGW
ClosedPublic

Authored by yaron.keren on Apr 18 2014, 3:19 AM.

Diff Detail

Event Timeline

It looks like LLVM has TLS support, in lib\Target\X86\X86ISelLowering.cpp:8550

if (Subtarget->isTargetKnownWindowsMSVC() ||
    Subtarget->isTargetWindowsGNU()) {
  // Just use the implicit TLS architecture

and test\CodeGen\X86\tls* do test for triple==x86-pc-win32, x86_64-pc-win32

yaron FYI the mingw triplets have been changed to "windows-gnu" by compnerd

Hi Martell,

Yes I know of the change, these are just the triples from the test which I did not modify.
The triples could be updated for new style in all tests but this is other decision to make.

rnk accepted this revision.Apr 18 2014, 1:20 PM

Nice, LGTM.

Clang now compiles thread variables correctly on Windows for me. C++11 thread_local and declpsec(thread) need more work though.

yaron.keren closed this revision.Apr 29 2014, 12:25 AM

Committed by rnk in r207470.