Difference between revisions of "Compilers"
(→Package and/or binary availability, by platform and compiler) |
(→Package and/or binary availability, by platform and compiler: removed outdated package versions) |
||
(18 intermediate revisions by 9 users not shown) | |||
Line 30: | Line 30: | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | |||
− | |||
− | |||
− | |||
== Which compiler should I use? == | == Which compiler should I use? == | ||
Line 52: | Line 48: | ||
*OS X | *OS X | ||
*FreeBSD | *FreeBSD | ||
+ | *Android (source) | ||
| | | | ||
*Windows (alpha) | *Windows (alpha) | ||
Line 62: | Line 59: | ||
*OS X | *OS X | ||
*FreeBSD | *FreeBSD | ||
+ | *OpenSolaris | ||
*iOS (experimental) | *iOS (experimental) | ||
+ | *Android (alpha) | ||
|--- | |--- | ||
Line 96: | Line 95: | ||
* i386 | * i386 | ||
* amd64 | * amd64 | ||
+ | * armel | ||
Near-complete support: | Near-complete support: | ||
Line 102: | Line 102: | ||
* ppc64 | * ppc64 | ||
* ppc64el | * ppc64el | ||
− | * | + | * mips64 |
Partial or bare-metal only support: | Partial or bare-metal only support: | ||
− | |||
* armhf | * armhf | ||
+ | * mips | ||
+ | * s390x | ||
|--- | |--- | ||
|'''Distribution''' | |'''Distribution''' | ||
Line 128: | Line 129: | ||
| | | | ||
*Source | *Source | ||
− | *Linux / OS X binary archive | + | *Windows / Linux / OS X binary archive |
*Debian/Ubuntu repository | *Debian/Ubuntu repository | ||
*Fedora repository | *Fedora repository | ||
Line 162: | Line 163: | ||
| | | | ||
* Linux | * Linux | ||
+ | * FreeBSD ? | ||
| | | | ||
| | | | ||
Line 169: | Line 171: | ||
| | | | ||
* Linux | * Linux | ||
+ | * FreeBSD ? | ||
* Windows ? | * Windows ? | ||
| | | | ||
Line 198: | Line 201: | ||
|--- | |--- | ||
|'''Object file format''' | |'''Object file format''' | ||
− | | OMF (32) / COFF (64) | + | | OMF (32) / COFF (32 & 64) |
| COFF | | COFF | ||
| COFF | | COFF | ||
Line 205: | Line 208: | ||
==Package and/or binary availability, by platform and compiler== | ==Package and/or binary availability, by platform and compiler== | ||
− | + | <div style="background:#ffd; padding: 0.5ex 0.5ex;"> | |
+ | <span style="font-size: 1.4em; color: #ca4;">⚠</span> This list had outdated information about package version - thus version information has been removed. Please check the most recent available package yourself on the linked pages. | ||
+ | </div> | ||
+ | |||
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. | 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. | ||
Line 221: | Line 227: | ||
!Windows | !Windows | ||
| | | | ||
− | *[http://dlang.org/download.html Manual download] | + | *[http://dlang.org/download.html Manual download] |
− | *[https://chocolatey.org Chocolatey] | + | *[https://chocolatey.org Chocolatey] |
| | | | ||
− | *[http://gdcproject.org/downloads Manual download] | + | *[http://gdcproject.org/downloads Manual download] |
| | | | ||
− | *[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] | + | *[https://www.macports.org MacPorts] |
− | *[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 | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | *[https://github.com/smolt/ldc-iphone-dev/releases Manual download] | ||
+ | |--- | ||
+ | !Android | ||
+ | | | ||
+ | *[[Build DMD for Android|Source]] | ||
+ | | | ||
+ | | | ||
+ | *[https://github.com/joakim-noah/android/releases Manual download] | ||
+ | *[[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] | + | *[http://gdcproject.org/downloads Manual download] |
| | | | ||
− | *[https://github.com/ldc-developers/ldc/releases Manual download] ( | + | *[https://github.com/ldc-developers/ldc/releases Manual download] |
+ | *[[LDC cross-compilation for ARM GNU/Linux|Source]] (ARM/Linux cross-compiler) | ||
|--- | |--- | ||
!Cross-platform | !Cross-platform | ||
Line 256: | Line 277: | ||
!Debian | !Debian | ||
| | | | ||
− | *[http://dlang.org/download.html Manual download] | + | *[http://dlang.org/download.html Manual download] |
− | *[http://d-apt.sourceforge.net APT repository] | + | *[http://d-apt.sourceforge.net APT repository] |
| | | | ||
− | * | + | * [https://packages.debian.org/jessie/gdc stable] |
− | * | + | * [https://packages.debian.org/stretch/gdc testing] |
− | * | + | * [https://packages.debian.org/sid/gdc unstable] |
| | | | ||
− | * | + | * [https://packages.debian.org/jessie/ldc stable] |
− | * | + | * [https://packages.debian.org/sid/ldc unstable] |
|--- | |--- | ||
!Ubuntu | !Ubuntu | ||
| | | | ||
− | *[http://dlang.org/download.html Manual download] | + | *[http://dlang.org/download.html Manual download] |
− | *[http://d-apt.sourceforge.net APT repository] | + | *[http://d-apt.sourceforge.net APT repository] |
| | | | ||
− | + | [http://packages.ubuntu.com/search?keywords=ldc gdc] | |
− | |||
− | |||
| | | | ||
− | + | [http://packages.ubuntu.com/search?keywords=ldc ldc] | |
− | |||
|--- | |--- | ||
!Fedora | !Fedora | ||
| | | | ||
− | *[http://dlang.org/download.html Manual download] | + | *[http://dlang.org/download.html Manual download] |
| | | | ||
| | | | ||
See https://apps.fedoraproject.org/packages/ldc | See https://apps.fedoraproject.org/packages/ldc | ||
− | |||
− | |||
− | |||
− | |||
|--- | |--- | ||
!OpenSuse | !OpenSuse | ||
| | | | ||
− | *[https://build.opensuse.org/package/show/devel:languages:D/dmd devel:languages:D] | + | *[https://build.opensuse.org/package/show/devel:languages:D/dmd devel:languages:D] |
| | | | ||
| | | | ||
− | *[https://build.opensuse.org/project/show/devel:languages:D devel:languages:D] | + | *[https://build.opensuse.org/project/show/devel:languages:D devel:languages:D] |
− | *[https://build.opensuse.org/project/show/home:marc_schuetz:branches:devel:languages:D home:marc_schuetz] | + | *[https://build.opensuse.org/project/show/home:marc_schuetz:branches:devel:languages:D home:marc_schuetz] |
|--- | |--- | ||
!CentOS | !CentOS | ||
| | | | ||
− | *[http://dlang.org/download.html Manual download] | + | *[http://dlang.org/download.html Manual download] |
| | | | ||
| | | | ||
Line 305: | Line 319: | ||
!Arch Linux | !Arch Linux | ||
| | | | ||
− | *Community | + | *Community |
| | | | ||
− | *Community | + | *Community |
*AUR ([https://aur.archlinux.org/packages/gdc-git/ git HEAD]) | *AUR ([https://aur.archlinux.org/packages/gdc-git/ git HEAD]) | ||
| | | | ||
− | *Community ( | + | *Community |
+ | *AUR ([https://aur.archlinux.org/packages/ldc-git/ git HEAD]) | ||
|--- | |--- | ||
!Gentoo | !Gentoo | ||
Line 317: | Line 332: | ||
!FreeBSD | !FreeBSD | ||
| | | | ||
− | *[http://dlang.org/download.html Manual download] | + | *[http://dlang.org/download.html Manual download] |
− | *Ports | + | *Ports |
| | | | ||
| | | | ||
|} | |} | ||
+ | == Experimental compilers and forks == | ||
+ | |||
+ | * [[SDC|SDC (Stupid D Compiler)]] - from-scratch D compiler implementation, written in idiomatic D. | ||
+ | * [https://github.com/smolt/ldc-iphone-dev LDC for iOS] - LDC-based toolkit for cross-compiling to iOS | ||
+ | * [https://github.com/joakim-noah/android/releases D for Android] - Toolkit for cross-compiling to Android (x86 using DMD and ARM using LDC) | ||
+ | * [https://github.com/Syniurge/Calypso Calypso] - LDC fork which provides direct Clang interoperability, allowing the use of C headers directly. | ||
+ | * [https://github.com/thewilsonator/ldc/tree/dcompute dcompute] ([[LDC CUDA and SPIRV]]) - Library and LDC fork to "target CUDA and SPIR to enable hassle free native execution on the gpu" | ||
+ | * [https://github.com/yebblies/dmd/tree/microd MicroD] - DMD fork which outputs C source code instead of object files | ||
+ | * [https://github.com/adamdruppe/dtojs dtojs] - DMD fork which outputs JavaScript source code instead of object files | ||
+ | * [[DIL]] - D compiler written in D2/Tango (inactive project) | ||
+ | |||
+ | Category page: [[Experimental compilers]] | ||
[[Category:Compiler]] | [[Category:Compiler]] |
Revision as of 22:18, 13 August 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
⚠ This list had outdated information about package version - thus version information has been removed. Please check the most recent available package yourself on the linked pages.
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 | |||
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.
- 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)
- Calypso - LDC fork which provides direct Clang interoperability, allowing the use of C headers directly.
- dcompute (LDC CUDA and SPIRV) - Library and LDC fork to "target CUDA and SPIR to enable hassle free native execution on the gpu"
- 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)
Category page: Experimental compilers