DMD, LDC, shared objects, rpath

David Nadlinger via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Tue Jun 20 08:27:37 PDT 2017


Hi Russel,

On 19 Jun 2017, at 20:09, Russel Winder via digitalmars-d-ldc wrote:
> I had thought shared libraries on OSX were supported by DMD now, but
> clearly the rpath stuff is not.

With rpath being a linker concept, there isn't really such a thing as a 
compiler not supporting "rpath stuff". Proper shared library support in 
D needs support code in druntime to integrate with the garbage 
collector, thread initialization, etc. To my knowledge, DMD currently 
doesn't do any of that on OS X.

What has changed somewhat recently is the way DMD implements TLS on OS 
X. Now it uses the default system facilities for it, which makes it 
easier to integrate with shared libraries (but requires 10.7+). 
Basically, all that is needed is somebody to sit down and port my work 
for LDC to DMD.

> I am guessing gdc 6.3.0 doesn't have shared library support on OSX.

To my knowledge, it doesn't, and hasn't been developed or tested for OS 
X for a while now.

> Whilst I don't actually use OSX by choice, yay for LDC. :-)

Indeed – if you are after full platform support, LDC is probably the 
compiler of choice.

Best regards,
David


More information about the digitalmars-d-ldc mailing list