<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">I think that's both true and not. Yes, it's not exposed through dyld to reuse its TLS routines (or, for that matter, its existing linker capabilities for in-memory objects). But I've also often seen that support to be a thin wrapper around `pthread_key_create`, which is defined in ISO/IEC 9945-1:1996 (``POSIX.1''). Or you can build your own emulation for expandable TLS by putting a thread-id-counter in the original TLS, and using that to index your own internally-managed memory regions.<br></div></div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 20, 2019 at 7:16 PM Joerg Sonnenberger via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On Fri, Dec 20, 2019 at 11:47:15PM +0530, Praveen Velliengiri via llvm-dev wrote:<br>
> Hi Jameson,<br>
> Why thread local support is hard to support in JITs? Whether Julia supports<br>
> Thread locals? If so, it would be very much helpful to know how.<br>
<br>
TLS is normally handled somewhere between libc and dynamic linker. There<br>
is currently no defined interface for requested another TLS segment or<br>
just static TLS space.<br>
<br>
Joerg<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div></div>