Difference between revisions of "Compilers"
(→Experimental compilers and forks: Add DCompute) |
(versions not maintained) |
||
Line 224: | Line 224: | ||
!Windows | !Windows | ||
| | | | ||
− | *[http://dlang.org/download.html Manual download] | + | *[http://dlang.org/download.html Manual download] |
*[https://chocolatey.org Chocolatey] (2.067.0, 2.068.1 available awaiting moderation) | *[https://chocolatey.org Chocolatey] (2.067.0, 2.068.1 available awaiting moderation) | ||
| | | | ||
*[http://gdcproject.org/downloads Manual download] (5.2.0 w/ dmd frontend 2.066.1) | *[http://gdcproject.org/downloads Manual download] (5.2.0 w/ dmd frontend 2.066.1) | ||
| | | | ||
− | *[https://github.com/ldc-developers/ldc/releases Manual download] | + | *[https://github.com/ldc-developers/ldc/releases Manual download] |
|--- | |--- | ||
!OS X | !OS X | ||
| | | | ||
− | *[http://brew.sh Homebrew] | + | *[http://brew.sh Homebrew] |
*[https://www.macports.org MacPorts] (2.068.0) | *[https://www.macports.org MacPorts] (2.068.0) | ||
− | *[http://dlang.org/download.html Manual download] | + | *[http://dlang.org/download.html Manual download] |
| | | | ||
| | | | ||
− | *[http://brew.sh Homebrew] | + | *[http://brew.sh Homebrew] |
− | *[https://github.com/ldc-developers/ldc/releases Manual download] | + | *[https://github.com/ldc-developers/ldc/releases Manual download] |
|--- | |--- | ||
!iOS | !iOS | ||
Line 252: | Line 252: | ||
| | | | ||
| | | | ||
− | *[https://github.com/joakim-noah/android/releases Manual download] | + | *[https://github.com/joakim-noah/android/releases Manual download] |
− | *[[Build LDC for Android|Source]] | + | *[[Build LDC for Android|Source]] |
|--- | |--- | ||
!Linux (generic) | !Linux (generic) | ||
| | | | ||
− | *[http://dlang.org/download.html Manual download] | + | *[http://dlang.org/download.html Manual download] |
| | | | ||
*[http://gdcproject.org/downloads Manual download] (5.2.0 w/ dmd frontend 2.066.1) | *[http://gdcproject.org/downloads Manual download] (5.2.0 w/ dmd frontend 2.066.1) | ||
| | | | ||
− | *[https://github.com/ldc-developers/ldc/releases Manual download] | + | *[https://github.com/ldc-developers/ldc/releases Manual download] |
|--- | |--- | ||
!Cross-platform | !Cross-platform | ||
Line 273: | Line 273: | ||
!Debian | !Debian | ||
| | | | ||
− | *[http://dlang.org/download.html Manual download] | + | *[http://dlang.org/download.html Manual download] |
*[http://d-apt.sourceforge.net APT repository] (2.068.0) | *[http://d-apt.sourceforge.net APT repository] (2.068.0) | ||
| | | | ||
Line 285: | Line 285: | ||
!Ubuntu | !Ubuntu | ||
| | | | ||
− | *[http://dlang.org/download.html Manual download] | + | *[http://dlang.org/download.html Manual download] |
*[http://d-apt.sourceforge.net APT repository] (2.068.0) | *[http://d-apt.sourceforge.net APT repository] (2.068.0) | ||
| | | | ||
Line 297: | Line 297: | ||
!Fedora | !Fedora | ||
| | | | ||
− | *[http://dlang.org/download.html Manual download] | + | *[http://dlang.org/download.html Manual download] |
| | | | ||
| | | | ||
Line 316: | Line 316: | ||
!CentOS | !CentOS | ||
| | | | ||
− | *[http://dlang.org/download.html Manual download] | + | *[http://dlang.org/download.html Manual download] |
| | | | ||
| | | | ||
Line 334: | Line 334: | ||
!FreeBSD | !FreeBSD | ||
| | | | ||
− | *[http://dlang.org/download.html Manual download] | + | *[http://dlang.org/download.html Manual download] |
*Ports (2.067.0) | *Ports (2.067.0) | ||
| | | |
Revision as of 14:10, 21 July 2016
DMD »Digital Mars D compiler |
GDC »GCC D compiler |
LDC »LLVM D compiler |
Which compiler should I use?
If you're a beginner DMD is the recommended choice, as it is the implementation closest to the D Language Specification. Otherwise it depends on what you need, what platforms you intend to develop for, and your personal preferences. GDC and LDC both generate substantially faster binaries than DMD.
Comparison
DMD | GDC | LDC | |
---|---|---|---|
Platforms |
|
|
|
Architectures |
|
Complete (runtime / standard library) support:
Partial or bare-metal only support (packages for gdc in debian):
|
Complete (runtime / standard library) support:
Near-complete support:
Partial or bare-metal only support:
|
Distribution |
|
|
|
Backend | DMD (DMC fork) | GCC | LLVM |
License | Frontend: GPL 1 or later / Artistic License
Backend: custom |
GPL 3 or later | LDC-specific code: 3-clause BSD |
Inline assembler |
|
|
|
SIMD | Partial (?) | Partial (?) | Partial (?) |
Phobos as a shared library |
|
| |
Building D code as shared library |
|
| |
Dynamic loading of D shared libraries |
|
| |
Linux specific | |||
Object file format | ELF | ELF | ELF |
Mac specific | |||
Object file format | Mach-O | Mach-O | Mach-O |
Windows specific | |||
Object file format | OMF (32) / COFF (32 & 64) | COFF | COFF |
Package and/or binary availability, by platform and compiler
Version number is given in brackets. Many of the manual download links have 10s of versions available, only the most recent few are listed here.
Some unofficial repositories and downloads are listed here, but of course many more do exist. With a little searching, you may be able to find something more up to date for your chosen OS.
Very old compilers are (mostly) omitted, as they are unlikely to be of interest to users.
Platform |
Compiler | ||
---|---|---|---|
DMD | GDC | LDC | |
Windows |
|
|
|
OS X |
|
||
iOS |
| ||
Android |
|
||
Linux (generic) |
|
||
Cross-platform |
|
||
Distribution-specific packages | |||
Debian |
|
| |
Ubuntu |
|
||
Fedora |
See https://apps.fedoraproject.org/packages/ldc
| ||
OpenSuse |
|
| |
CentOS | |||
Arch Linux |
|
|
|
Gentoo | see https://wiki.gentoo.org/wiki/Dlang | ||
FreeBSD |
|
Experimental compilers and forks
- SDC (Stupid D Compiler) - from-scratch D compiler implementation, written in idiomatic D.
- Calypso - LDC fork which provides direct Clang interoperability, allowing the use of C headers directly.
- LDC for iOS - LDC-based toolkit for cross-compiling to iOS
- D for Android - Toolkit for cross-compiling to Android (x86 using DMD and ARM using LDC)
- MicroD - DMD fork which outputs C source code instead of object files
- dtojs - DMD fork which outputs JavaScript source code instead of object files
- DIL - D compiler written in D2/Tango (inactive project)
- dcompute - Library and LDC fork to "target CUDA and SPIR to enable hassle free native execution on the gpu"
Category page: Experimental compilers