Support dynamic loading (again)
llvm-d 1.x to llvm-d 2.x moved from dynamic loading to (dynamic/static) linking.
This readds support for dynamic loading via compile time introspection.
- 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 on how to optimize the cost for the dynamic introspection