Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

LLVM D Compiler

LDC is a compiler for the D programming Language. It is based on the DMD frontend and uses LLVM as backend. LLVM provides a fast and modern backend for high quality code generation. LDC is released under a BSD license with exceptions for the DMD frontend and code from GDC.

The development takes place mostly on x86-32 and x86-64 Linux and that is where LDC works best. Support for other platforms and architectures is under development, but we are still looking for people to help test and adjust LDC for those platforms!

LDC already compiles a lot of D code, but should still be considered beta quality. Take a look at the tickets to get a better impression on what still needs to be implemented.

We have two sets of tests living in the tests directory. The mini testsuite in mini/ and minicomplex/ contains a few tests that are supposed to compile or run and is mostly used when fixing a bug. There is also the larger DStress based test suite comparing LDC revisions among themselves and to DMD (x86-32 and x86-64).

Project Status and Downloads

  • LDC currently only works for D1 and with the Tango runtime/library.
  • D2 support is highly experimental (read: unusable)

See the tickets for more details.

Install instructions

To install LDC, follow our generic install instructions.

Some distributions include premade packages for LDC which come with separate instructions:

Note that these were not created by the LDC developers. Please contact their respective authors if there are issues with these packages.

Documentation

Communication

Feedback is much appreciated. You can contact us via:

If you've found a bug, feel free to report it directly.

Build LDC/Tango From Sources

To work with ldc you need the Tango runtime/library:

D2 LDC Status

D2 support is a stub and very experimental. Anyone interested to improve it (or LDC in general) is highly welcome.

D binding for LLVM

While not part of the LDC compiler, llvm-c bindings for D can be found in the svn of the Bindings project. These bindings are a wrapper around the LLVM C interface with a few extensions.

Copyright © 2008, LDC Development Team.