llvm-d 2.2 Dynamic loading (yet again)
Moritz Maxeiner via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Wed May 17 07:55:12 PDT 2017
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
More information about the Digitalmars-d-announce
mailing list