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

Jacob Carlborg doob at me.com
Sat Dec 3 13:22:18 PST 2011


On 2 dec 2011, at 20:45, Sean Kelly wrote:
> I don't know if it matters, but __thread should be natively supported in Lion (by llvm-gcc, not DMD).  OSX is doing away with GCC so it wouldn't surprise me if no effort had been made to add __thread support to that.


I downloaded the source code for dyld, the version that ships with 10.7.2. There seems to be support for TLS, they call it TLV (Thread Local Variable). But it seems impossible to find any documentation about this.

The function used to get a variable  is called "tlv_get_addr".

-- 
/Jacob Carlborg



More information about the dmd-internals mailing list