www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Preview: Shared library support on OS X

Hi all,

I finally got around to porting the druntime module registry 
system we are using on the ELF-based Posixen to OS X. This allows 
shared library support to work in a natural way.

There are still some minor additions to make (module conflict 
detection, automatic library dependency tracking). But apart from 
that, what I currently have passes the complete test suite, which 
notably also includes runtime loading/unloading of D shared 
libraries.

If you are keen to give it a try, you can get the code from 
https://github.com/ldc-developers/ldc/pull/1705 and build with 
"cmake -DBUILD_SHARED_LIBS=ON …".

I expect to land the feature in master by the end of August, but 
until then, there are also some upstreaming considerations to 
work out (it won't work out of the box with DMD, but for somebody 
familiar with DMD's backend it would be trivial to make the 
necessary adjustments).

  — David
Aug 18 2016