Version 39 (modified by lindquist, 16 years ago) |
---|
LLVM D Compiler
LLVM D Compiler for the D programming Language, is based on the DMD 1.0 frontend and uses LLVM as backend.
You can download the source from SVN with: svn co http://svn.dsource.org/projects/llvmdc/trunk llvmdc
LLVMDC can already compile quite a bit of D code. Take a look at the test cases, all of them are run before each commit to make sure nothing breaks. However there is still some way to a fully compliant D 1.0 compiler...
There is even a little documentation now :)
LLVMDC has no support for:
- Exception Handling
- Garbage Collector
LLVMDC has limited support for:
- Dynamic memory
- Dwarf debug symbols
For a more detailed and exhaustive list, take a look at the tickets.
x86, x86-64, PPC and PPC64 architectures should be supported, but only x86 and x86-64 on Linux has been tested, there may well be problems on other platforms.
Any feedback is much appreciated, either on the forum or through the tracker.
Alternatively you can send me a gmail at: 'tomas.l.olsen', and usually I'm on the #d FreeNode IRC channel as 'lindquist'.
How To Compile
Dependencies:
- LLVM 2.1 (3)
- Premake (4)
- GC 7.0 (older ok?) (5)
- DSSS (rebuild) (6)
- GDC 0.24 (for building the test drivers) (7)
First you will need LLVM 2.1, get that from your package repository if you can, or download it from the LLVM website. They have installation instructions over there and even precompiled packages. If you are using Arch Linux, you can get the 'llvm' package from AUR.
You will also need Premake to generate the Makefile, as well as the Hans Boehm GC for C/C++ (Arch users get the 'gc' package). Links to all this is in the bottom.
Grab LLVMDC from the SVN repository:
svn co http://svn.dsource.org/projects/llvmdc/trunk llvmdc cd llvmdc
Generate the makefile:
premake --target gnu
Compile LLVMDC:
make
Put LLVMDC into your path. This is necessary if you want it to be easy.
export PATH=$PATH:`pwd`/bin
Install the llvmdc-posix rebuild profile.
mkdir -p $HOME/.rebuild ln -s llvmdc-posix $HOME/.rebuild
Compile the runtime for your architecture.
cd lphobos ./build.sh cd ..
Run the test suite:
gdmd -run runalltests.d
Please report any problems you might have, and good luck :)
Links
2 http://www.digitalmars.com/d
4 http://premake.sourceforge.net/
5 http://www.hpl.hp.com/personal/Hans_Boehm/gc/