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.
- 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

- Moritz

  • llvm-d 2.2 Dynamic loading (yet... Moritz Maxeiner via Digitalmars-d-announce

Reply via email to