www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - llvm-d 2.2 Dynamic loading (yet again)

reply Moritz Maxeiner <moritz ucworks.org> writes:
In response to a DConf 2017 request regarding this, llvm-d again 
supports dynamic loading.
The API is essentially the same as is was for llvm 1.x, though 
you have to enable it with D versions.

- Single shared library only (e.g. libLLVM-X.Y.Z.so)
- Switch from (dynamic/static) linking to dynamic loading by 
setting the D version LLVM_Load.
- Use LLVM.load / LLVM.unload for manual control over which 
shared library to use
- Additionally set D version LLVM_Autoload to try to load a 
platform appropriate default shared library for LLVM
- As compile time introspection is used to generate function 
pointers dynamic loading has increased compilation time.

Special thanks to everyone who provided feedback[1] on how to 
optimize the cost for the dynamic introspection

https://github.com/Calrama/llvm-d/releases/v2.2.0
https://code.dlang.org/packages/llvm-d/2.2.0

- Moritz

[1] 
http://forum.dlang.org/thread/fennfzjwzdlzcbtsjnxi forum.dlang.org
May 17 2017
parent Stefan Koch <uplink.coder googlemail.com> writes:
On Wednesday, 17 May 2017 at 14:55:12 UTC, Moritz Maxeiner wrote:
 In response to a DConf 2017 request regarding this, llvm-d 
 again supports dynamic loading.
 The API is essentially the same as is was for llvm 1.x, though 
 you have to enable it with D versions.

 [...]
Many Thanks.
May 17 2017