On 2015-05-21 07:06, Joakim wrote:

Actually, TLS works on OS X: dmd emulates it, while ldc has native TLS
using undocumented OS X APIs.

The emulated TLS won't work with dynamic libraries. The runtime can only fetch the TLS data from one source, which will be the executable itself.

I'm unsure of how full-fledged the
support is on those other issues, but I believe the big issue is that
loading multiple shared libraries is not supported, as that will take
more work:

https://github.com/D-Programming-Language/druntime/blob/master/src/rt/sections_osx.d#L198

No, that issue is loading dynamic libraries regardless if it's one or several. As you can see in the comment, it will pick the sections from the executable.

If you want to talk to someone about getting more of shared libraries
working, I believe Martin is your man.

Yeah, but I'm not sure how familiar he is with the OS X specific things. And native TLS is a requirement, which requires changes in the compiler and the runtime. Alternatively we need to reimplement the TLS handling from the dynamic linker.

--
/Jacob Carlborg

Reply via email to