[dmd-internals] Building Phobos and druntime as a dylib on Mac OS X

Sean Kelly sean at invisibleduck.org
Wed Dec 7 14:49:24 PST 2011


On Dec 3, 2011, at 2:37 PM, Jacob Carlborg wrote:
> 
> Sean mentioned that TLS is supported natively in Mac OS X Lion. I've downloaded the source code for dyld, the release that ships with Lion and it seems to be correct. There's a function called "tlv_get_addr" that seems to be doing the same as "__tls_get_addr" does on Linux. It looks a bit different from the ELF implementation, different function names and similar, but it seems to be doing the same thing.

The implementation is different from ELF.  I don't know how this was implemented at a code level but I do know a bit about where stuff lives and how to get at it.  The bigger issue to me is whether we compile different versions of TLS for 10.7 and 10.6 or if we want to stick with what we've got until 10.8 is released.


More information about the dmd-internals mailing list