Skip to content

Releases: MoritzMaxeiner/llvm-d

LLVM 8, load dynamically from multiple shared libraries

27 Apr 18:43
Compare
Choose a tag to compare
  • Add API support for LLVM 8
  • When using dynamic loading, you can now specify multiple libraries to search through via LLVM.load, e.g.
    LLVM.load("libLLVM.so", "libLTO.so"). This change was required to support dynamically loading lto/thinlto functionality, which is generally not available through the main LLVM shared library. Due to this, you can also now dynamically load when the main shared library has been split into multiple shared libraries, just list all of them. If auto loading is used or no libraries are passed toLLVM.load then llvm-d will now also try to load the LTO shared library.
  • Backwards incompatible change of default behavior: When dynamically loading without explicitly set filename(s), search for a main LLVM shared library without the version in its name (so e.g. libLLVM.so instead of libLLVM-8.0.0.so).

LLVM 7

29 Oct 11:33
Compare
Choose a tag to compare
v2.4.1

Bugfix release

LLVM 5.0 and 6.0

02 Mar 15:39
8fe9dc3
Compare
Choose a tag to compare
Support for LLVM 5.0 amd 6.0

Thanks to foerdi once again

Support dynamic loading (again)

17 May 14:44
Compare
Choose a tag to compare

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

v2.1.1

29 Apr 00:20
Compare
Choose a tag to compare
Add target information to README

Support LLVM 4.0.0

28 Apr 23:57
Compare
Choose a tag to compare

Thanks go to @foerdi for doing the annoying part.

Bug fix release

18 Apr 23:53
Compare
Choose a tag to compare
v2.0.3

Bug fix release

v2.0.2: Bug fix release

11 Feb 17:53
Compare
Choose a tag to compare
Also updates the fibonacci example to show how to
correctly use MCJIT.

Dynamic linking, CT target selection

28 Jan 15:34
Compare
Choose a tag to compare

API changes

  • From now on just import the llvm module.
  • Switch from dynamic loading to dynamic linking;
    LLVM.load is thus no longer needed (and is,
    in fact, also not available anymore), you need
    to link against the correct libraries from this
    release onwards. This will be either one library,
    if LLVM was built as a single dynamic library, or
    several, in case LLVM was built with one library
    per module. In the latter case you'll need to identify
    which libraries to link against yourself, but a good starting
    point would be examples/fibonacci/dub.json and LLVM's module documentation.
  • LLVM Targets: llvm-d makes no automatic assumptions about which
    targets LLVM was compiled with (and are thus available in
    the dynamic libraries). You need to provide llvm-d with
    the targets yourself by setting appropriate compile time
    D versions (the same way that you do it for version of LLVM itself):
    The D version LLVM_Target_XyZ instructs llvm-d to assume
    that the LLVM Target XyZ will be linked in and provide appropriate
    initialization for it; notice that the target name is case sensitive.
    For now, llvm-d's dub package comes with two configurations:
    • native-target: Instructs llvm-d to assume the native target for
      the current platform will be linked in.
    • no-target: Provides no target assumptions to llvm-d.

Why switch to dynamic linking?

Support for platforms on which LLVM is built with one library per module while retaining dynamic loading would require mapping functions pointers to libraries they should be loaded from;
this would require a non-negligible amount of boilerplate code, especially since there's no guarantee that such a mapping were to remain stable for later releases of LLVM.
So instead of introducing even more boilerplate code, I judged it more practical to switch to dynamic linking, which incidentally also gets rid of a significant amount of existing boilerplate code.

v1.1.1: Merge pull request #13 from foerdi/master

17 Dec 23:27
Compare
Choose a tag to compare
fixed uint to ulong from LLVMOrcTargetAddress