https://wiki.dlang.org/api.php?action=feedcontributions&user=DanOlson&feedformat=atomD Wiki - User contributions [en]2024-03-29T08:57:09ZUser contributionsMediaWiki 1.31.2https://wiki.dlang.org/?title=Compilers&diff=7126Compilers2015-12-21T18:32:32Z<p>DanOlson: /* Package and/or binary availability, by platform and compiler */</p>
<hr />
<div>__NOTOC__<br />
{{:Compilers_Widget}}<br />
<table style="width:100%;" cellspacing="10"><br />
<tr><br />
<td style="width:33%; vertical-align: top; padding: 10px 10px; background: #f9f9f9; border: 1px solid #ccc; border-top: 1px solid #eee; border-bottom: 2px solid #999;"><br />
= [[DMD|DMD &raquo;]] =<br />
'''Digital Mars D compiler''' <br/>The formal D compiler.<br />
<div style="text-align: right;">[[DMD|DMD Portal &raquo;]]</div><br />
</td><br />
<br />
<td style="width:33%; vertical-align: top; padding: 10px 10px; background: #f9f9f9; border: 1px solid #ccc; border-top: 1px solid #eee; border-bottom: 2px solid #999;"><br />
<br />
<br />
<br />
[[Category:Compiler]]<br />
<br />
= [[GDC|GDC &raquo;]] =<br />
'''GCC D compiler'''<br/><br />
Fast and open source.<br />
<div style="text-align: right;">[[GDC|GDC Portal &raquo;]]</div><br />
</td><br />
<br />
<td style="width:33%; vertical-align: top; padding: 10px 10px; background: #f9f9f9; border: 1px solid #ccc; border-top: 1px solid #eee; border-bottom: 2px solid #999;"><br />
= [[LDC|LDC &raquo;]] =<br />
'''LLVM D compiler'''<br/><br />
Fast and open source.<br />
<div style="text-align: right;">[[LDC|LDC Portal &raquo;]]</div><br />
</td><br />
<br />
</tr><br />
</table><br />
<br />
<br />
Also see: [[Experimental compilers]]<br />
<br />
<br />
== Which compiler should I use? ==<br />
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.<br />
<br />
== Comparison ==<br />
<br />
{| class="wikitable" style="width: 65em"<br />
!<br />
!DMD<br />
!GDC<br />
!LDC<br />
|---<br />
|'''Platforms'''<br />
|<br />
*Windows<br />
*Linux<br />
*OS X<br />
*FreeBSD<br />
*Android (source)<br />
|<br />
*Windows (alpha)<br />
*Linux<br />
*OS X (untested)<br />
*FreeBSD (untested)<br />
|<br />
*Windows<br />
*Linux<br />
*OS X<br />
*FreeBSD<br />
*OpenSolaris<br />
*iOS (experimental)<br />
*Android (alpha)<br />
|---<br />
<br />
|'''Architectures'''<br />
|<br />
* i386<br />
* amd64<br />
|<br />
Complete (runtime / standard library) support:<br />
* i386<br />
* amd64<br />
* x32<br />
* armel<br />
* armhf<br />
<br />
Partial or bare-metal only support (packages for gdc in [https://packages.debian.org/sid/gdc-5 debian]):<br />
* alpha<br />
* arm64 (aarch64)<br />
* hppa<br />
* hurd-i386<br />
* kfreebsd-amd64<br />
* kfreebsd-i386<br />
* m68k<br />
* mips<br />
* mipsel<br />
* ppc<br />
* pcc64<br />
* ppc64el<br />
* s390x<br />
* sparc64<br />
|<br />
Complete (runtime / standard library) support:<br />
* i386<br />
* amd64<br />
* armel<br />
<br />
Near-complete support:<br />
* arm64 (aarch64)<br />
* ppc<br />
* ppc64<br />
* ppc64el<br />
* mips64<br />
<br />
Partial or bare-metal only support:<br />
* armhf<br />
* mips<br />
* s390x<br />
|---<br />
|'''Distribution'''<br />
|<br />
*Source<br />
*Multi-platform source/binary archive<br />
*Multi-platform installer ([https://github.com/jacob-carlborg/dvm DVM])<br />
*Windows installer<br />
*OS X package (.dmg)<br />
*Debian/Ubuntu package (.deb)<br />
*Fedora package (.rpm)<br />
*OpenSUSE (.rpm) package<br />
*Debian/Ubuntu repository via http://d-apt.sourceforge.net<br />
*OS-X homebrew and macports repositories<br />
|<br />
*Source<br />
*Windows / Linux binary archive<br />
*Debian/Ubuntu repository<br />
*Gentoo repository<br />
*Archlinux repository<br />
|<br />
*Source<br />
*Linux / OS X binary archive<br />
*Debian/Ubuntu repository<br />
*Fedora repository<br />
*Gentoo repository<br />
|---<br />
|'''Backend'''<br />
| [https://github.com/D-Programming-Language/dmd/tree/master/src/backend DMD] ([http://digitalmars.com/download/freecompiler.html DMC] fork)<br />
| [http://gcc.gnu.org/ GCC]<br />
| [http://llvm.org/ LLVM]<br />
|---<br />
|'''License'''<br />
| Frontend: GPL 1 or later / Artistic License<br />
Backend: [https://github.com/D-Programming-Language/dmd/blob/master/src/backendlicense.txt custom]<br />
| GPL 3 or later<br />
| LDC-specific code: 3-clause BSD<br />
|---<br />
|'''Inline assembler'''<br />
|<br />
* DMD Intel-like syntax (i386/amd64)<br />
|<br />
* GCC syntax (all targets)<br />
|<br />
* DMD Intel-like syntax (i386/amd64)<br />
* GCC syntax (all targets)<br />
* [[LDC inline IR|LLVM inline IR]]<br />
|---<br />
|'''SIMD'''<br />
| Partial (?)<br />
| Partial (?)<br />
| Partial (?)<br />
|---<br />
|'''Phobos as a shared library'''<br />
|<br />
* Linux<br />
* FreeBSD ?<br />
|<br />
|<br />
* Linux<br />
|---<br />
|'''Building D code as shared library'''<br />
|<br />
* Linux<br />
* FreeBSD ?<br />
* Windows ?<br />
|<br />
|<br />
* Linux<br />
|---<br />
|'''Dynamic loading of D shared libraries'''<br />
|<br />
* Linux<br />
|<br />
|<br />
* Linux<br />
|---<br />
!colspan="4" align="center"|<br/>'''Linux specific'''<br />
|---<br />
|'''Object file format'''<br />
| ELF<br />
| ELF<br />
| ELF<br />
|---<br />
!colspan="4" align="center"|<br/>'''Mac specific'''<br />
|---<br />
|'''Object file format'''<br />
| Mach-O<br />
| Mach-O<br />
| Mach-O<br />
|---<br />
!colspan="4" align="center"|<br/>'''Windows specific'''<br />
|---<br />
|'''Object file format'''<br />
| OMF (32) / COFF (32 & 64)<br />
| COFF<br />
| COFF<br />
|}<br />
<br />
==Package and/or binary availability, by platform and compiler==<br />
<br />
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.<br />
<br />
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.<br />
<br />
Very old compilers are (mostly) omitted, as they are unlikely to be of interest to users.<br />
<br />
{| class="wikitable" style="width: 65em"<br />
!rowspan="2"|<br/>Platform<br />
!colspan="3" align="center"|Compiler<br />
|---<br />
!DMD<br />
!GDC<br />
!LDC<br />
|---<br />
!Windows<br />
|<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
*[https://chocolatey.org Chocolatey] (2.067.0, 2.068.1 available awaiting moderation)<br />
|<br />
*[http://gdcproject.org/downloads Manual download] (5.2.0 w/ dmd frontend 2.066.1)<br />
|<br />
*[https://github.com/ldc-developers/ldc/releases Manual download] (0.15.1, 0.15.2-beta2, 0.16.0-beta1)<br />
|---<br />
!OS X<br />
|<br />
*[http://brew.sh Homebrew] (2.068.2)<br />
*[https://www.macports.org MacPorts] (2.068.0)<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
|<br />
|<br />
*[http://brew.sh Homebrew] (0.16.0)<br />
*[https://github.com/ldc-developers/ldc/releases Manual download] (0.16.0)<br />
|---<br />
!iOS<br />
|<br />
|<br />
|<br />
*[https://github.com/smolt/ldc-iphone-dev/releases Manual download] (0.17.0-alpha1 experimental)<br />
|---<br />
!Android<br />
|<br />
*[[Build DMD for Android|Source]] (2.070 git master)<br />
|<br />
|<br />
*[https://github.com/joakim-noah/android/releases/tag/runners Manual download] (0.17.0 alpha)<br />
*[[Build LDC for Android|Source]] (0.17.0 alpha)<br />
|---<br />
!Linux (generic)<br />
|<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
|<br />
*[http://gdcproject.org/downloads Manual download] (5.2.0 w/ dmd frontend 2.066.1)<br />
|<br />
*[https://github.com/ldc-developers/ldc/releases Manual download] (0.15.1, 0.15.2-beta2, 0.16.0-beta1)<br />
|---<br />
!Cross-platform<br />
|<br />
* [https://github.com/jacob-carlborg/dvm DVM] (Any version)<br />
|<br />
|<br />
|---<br />
!colspan="4" | Distribution-specific packages<br />
|---<br />
!Debian<br />
|<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
*[http://d-apt.sourceforge.net APT repository] (2.068.0)<br />
|<br />
*Stable ([https://packages.debian.org/jessie/gdc-4.8 4.8.4], [https://packages.debian.org/jessie/gdc-4.9 4.9.2])<br />
*Testing (([https://packages.debian.org/stretch/gdc-4.8 4.8.5], [https://packages.debian.org/stretch/gdc-4.9 4.9.3], [https://packages.debian.org/stretch/gdc-5 5.2.1]))<br />
*Unstable ([https://packages.debian.org/sid/gdc-4.8 4.8.5], [https://packages.debian.org/sid/gdc-4.9 4.9.3], [https://packages.debian.org/sid/gdc-5 5.2.1])<br />
|<br />
*Stable/Testing/Unstable (0.14.0)<br />
*Experimental (0.15.1)<br />
|---<br />
!Ubuntu<br />
|<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
*[http://d-apt.sourceforge.net APT repository] (2.068.0)<br />
|<br />
*14.04 ([http://packages.ubuntu.com/trusty-updates/gdc-4.8 4.8.4])<br />
*15.04 ([http://packages.ubuntu.com/vivid/gdc-4.8 4.8.4], [http://packages.ubuntu.com/vivid/gdc-4.9 4.9.2])<br />
*15.10 ([http://packages.ubuntu.com/wily/gdc-4.8 4.8.5], [http://packages.ubuntu.com/wily/gdc-4.9 4.9.3], [http://packages.ubuntu.com/wily/gdc-5 5.2.1])<br />
|<br />
*15.04 ([http://packages.ubuntu.com/vivid/ldc 0.14.0])<br />
*15.10 ([http://packages.ubuntu.com/wily/ldc 0.14.0])<br />
|---<br />
!Fedora<br />
|<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
|<br />
|<br />
See https://apps.fedoraproject.org/packages/ldc<br />
*21 (0.13.0)<br />
*22 (0.15.1)<br />
*23 (0.15.2.beta1)<br />
*Rawhide (0.16.0.alpha3)<br />
|---<br />
!OpenSuse<br />
|<br />
*[https://build.opensuse.org/package/show/devel:languages:D/dmd devel:languages:D] (2.068.2)<br />
|<br />
|<br />
*[https://build.opensuse.org/project/show/devel:languages:D devel:languages:D] (0.15.1)<br />
*[https://build.opensuse.org/project/show/home:marc_schuetz:branches:devel:languages:D home:marc_schuetz] (0.15.2-beta2)<br />
|---<br />
!CentOS<br />
|<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
|<br />
|<br />
|---<br />
!Arch Linux<br />
|<br />
*Community (2.068.2)<br />
|<br />
*Community (5.2.0)<br />
*AUR ([https://aur.archlinux.org/packages/gdc-git/ git HEAD])<br />
|<br />
*Community (0.15.1)<br />
|---<br />
!Gentoo<br />
|colspan="3" align=center | see https://wiki.gentoo.org/wiki/Dlang<br />
|---<br />
!FreeBSD<br />
|<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
*Ports (2.067.0)<br />
|<br />
|<br />
|}<br />
<br />
<br />
[[Category:Compiler]]</div>DanOlsonhttps://wiki.dlang.org/?title=Compilers&diff=6927Compilers2015-11-05T07:06:30Z<p>DanOlson: </p>
<hr />
<div>__NOTOC__<br />
{{:Compilers_Widget}}<br />
<table style="width:100%;" cellspacing="10"><br />
<tr><br />
<td style="width:33%; vertical-align: top; padding: 10px 10px; background: #f9f9f9; border: 1px solid #ccc; border-top: 1px solid #eee; border-bottom: 2px solid #999;"><br />
= [[DMD|DMD &raquo;]] =<br />
'''Digital Mars D compiler''' <br/>The formal D compiler.<br />
<div style="text-align: right;">[[DMD|DMD Portal &raquo;]]</div><br />
</td><br />
<br />
<td style="width:33%; vertical-align: top; padding: 10px 10px; background: #f9f9f9; border: 1px solid #ccc; border-top: 1px solid #eee; border-bottom: 2px solid #999;"><br />
<br />
<br />
<br />
[[Category:Compiler]]<br />
<br />
= [[GDC|GDC &raquo;]] =<br />
'''GCC D compiler'''<br/><br />
Fast and open source.<br />
<div style="text-align: right;">[[GDC|GDC Portal &raquo;]]</div><br />
</td><br />
<br />
<td style="width:33%; vertical-align: top; padding: 10px 10px; background: #f9f9f9; border: 1px solid #ccc; border-top: 1px solid #eee; border-bottom: 2px solid #999;"><br />
= [[LDC|LDC &raquo;]] =<br />
'''LLVM D compiler'''<br/><br />
Fast and open source.<br />
<div style="text-align: right;">[[LDC|LDC Portal &raquo;]]</div><br />
</td><br />
<br />
</tr><br />
</table><br />
<br />
<br />
Also see: [[Experimental compilers]]<br />
<br />
<br />
== Which compiler should I use? ==<br />
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.<br />
<br />
== Comparison ==<br />
<br />
{| class="wikitable" style="width: 65em"<br />
!<br />
!DMD<br />
!GDC<br />
!LDC<br />
|---<br />
|'''Platforms'''<br />
|<br />
*Windows<br />
*Linux<br />
*OS X<br />
*FreeBSD<br />
|<br />
*Windows (alpha)<br />
*Linux<br />
*OS X (untested)<br />
*FreeBSD (untested)<br />
|<br />
*Windows<br />
*Linux<br />
*OS X<br />
*FreeBSD<br />
*OpenSolaris<br />
*iOS (experimental)<br />
|---<br />
<br />
|'''Architectures'''<br />
|<br />
* i386<br />
* amd64<br />
|<br />
Complete (runtime / standard library) support:<br />
* i386<br />
* amd64<br />
* x32<br />
* armel<br />
* armhf<br />
<br />
Partial or bare-metal only support (packages for gdc in [https://packages.debian.org/sid/gdc-5 debian]):<br />
* alpha<br />
* arm64 (aarch64)<br />
* hppa<br />
* hurd-i386<br />
* kfreebsd-amd64<br />
* kfreebsd-i386<br />
* m68k<br />
* mips<br />
* mipsel<br />
* ppc<br />
* pcc64<br />
* ppc64el<br />
* s390x<br />
* sparc64<br />
|<br />
Complete (runtime / standard library) support:<br />
* i386<br />
* amd64<br />
<br />
Near-complete support:<br />
* arm64 (aarch64)<br />
* ppc<br />
* ppc64<br />
* ppc64el<br />
* mips64<br />
<br />
Partial or bare-metal only support:<br />
* armel<br />
* armhf<br />
* mips<br />
* s390x<br />
|---<br />
|'''Distribution'''<br />
|<br />
*Source<br />
*Multi-platform source/binary archive<br />
*Multi-platform installer ([https://github.com/jacob-carlborg/dvm DVM])<br />
*Windows installer<br />
*OS X package (.dmg)<br />
*Debian/Ubuntu package (.deb)<br />
*Fedora package (.rpm)<br />
*OpenSUSE (.rpm) package<br />
*Debian/Ubuntu repository via http://d-apt.sourceforge.net<br />
*OS-X homebrew and macports repositories<br />
|<br />
*Source<br />
*Windows / Linux binary archive<br />
*Debian/Ubuntu repository<br />
*Gentoo repository<br />
*Archlinux repository<br />
|<br />
*Source<br />
*Linux / OS X binary archive<br />
*Debian/Ubuntu repository<br />
*Fedora repository<br />
*Gentoo repository<br />
|---<br />
|'''Backend'''<br />
| [https://github.com/D-Programming-Language/dmd/tree/master/src/backend DMD] ([http://digitalmars.com/download/freecompiler.html DMC] fork)<br />
| [http://gcc.gnu.org/ GCC]<br />
| [http://llvm.org/ LLVM]<br />
|---<br />
|'''License'''<br />
| Frontend: GPL 1 or later / Artistic License<br />
Backend: [https://github.com/D-Programming-Language/dmd/blob/master/src/backendlicense.txt custom]<br />
| GPL 3 or later<br />
| LDC-specific code: 3-clause BSD<br />
|---<br />
|'''Inline assembler'''<br />
|<br />
* DMD Intel-like syntax (i386/amd64)<br />
|<br />
* GCC syntax (all targets)<br />
|<br />
* DMD Intel-like syntax (i386/amd64)<br />
* GCC syntax (all targets)<br />
* [[LDC inline IR|LLVM inline IR]]<br />
|---<br />
|'''SIMD'''<br />
| Partial (?)<br />
| Partial (?)<br />
| Partial (?)<br />
|---<br />
|'''Phobos as a shared library'''<br />
|<br />
* Linux<br />
|<br />
|<br />
* Linux<br />
|---<br />
|'''Building D code as shared library'''<br />
|<br />
* Linux<br />
* Windows ?<br />
|<br />
|<br />
* Linux<br />
|---<br />
|'''Dynamic loading of D shared libraries'''<br />
|<br />
* Linux<br />
|<br />
|<br />
* Linux<br />
|---<br />
!colspan="4" align="center"|<br/>'''Linux specific'''<br />
|---<br />
|'''Object file format'''<br />
| ELF<br />
| ELF<br />
| ELF<br />
|---<br />
!colspan="4" align="center"|<br/>'''Mac specific'''<br />
|---<br />
|'''Object file format'''<br />
| Mach-O<br />
| Mach-O<br />
| Mach-O<br />
|---<br />
!colspan="4" align="center"|<br/>'''Windows specific'''<br />
|---<br />
|'''Object file format'''<br />
| OMF (32) / COFF (64)<br />
| COFF<br />
| COFF<br />
|}<br />
<br />
==Package and/or binary availability, by platform and compiler==<br />
<br />
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.<br />
<br />
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.<br />
<br />
Very old compilers are (mostly) omitted, as they are unlikely to be of interest to users.<br />
<br />
{| class="wikitable" style="width: 65em"<br />
!rowspan="2"|<br/>Platform<br />
!colspan="3" align="center"|Compiler<br />
|---<br />
!DMD<br />
!GDC<br />
!LDC<br />
|---<br />
!Windows<br />
|<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
*[https://chocolatey.org Chocolatey] (2.067.0, 2.068.1 available awaiting moderation)<br />
|<br />
*[http://gdcproject.org/downloads Manual download] (5.2.0 w/ dmd frontend 2.066.1)<br />
|<br />
*[https://github.com/ldc-developers/ldc/releases Manual download] (0.15.1, 0.15.2-beta2, 0.16.0-beta1)<br />
|---<br />
!OS X<br />
|<br />
*[http://brew.sh Homebrew] (2.068.2)<br />
*[https://www.macports.org MacPorts] (2.068.0)<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
|<br />
|<br />
*[http://brew.sh Homebrew] (0.16.0)<br />
*[https://github.com/ldc-developers/ldc/releases Manual download] (0.16.0)<br />
|---<br />
!iOS<br />
|<br />
|<br />
|<br />
*[https://github.com/smolt/ldc-iphone-dev/releases Manual download] (0.16.1 experimental)<br />
|---<br />
!Linux (generic)<br />
|<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
|<br />
*[http://gdcproject.org/downloads Manual download] (5.2.0 w/ dmd frontend 2.066.1)<br />
|<br />
*[https://github.com/ldc-developers/ldc/releases Manual download] (0.15.1, 0.15.2-beta2, 0.16.0-beta1)<br />
|---<br />
!Cross-platform<br />
|<br />
* [https://github.com/jacob-carlborg/dvm DVM] (Any version)<br />
|<br />
|<br />
|---<br />
!colspan="4" | Distribution-specific packages<br />
|---<br />
!Debian<br />
|<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
*[http://d-apt.sourceforge.net APT repository] (2.068.0)<br />
|<br />
*Stable ([https://packages.debian.org/jessie/gdc-4.8 4.8.4], [https://packages.debian.org/jessie/gdc-4.9 4.9.2])<br />
*Testing (([https://packages.debian.org/stretch/gdc-4.8 4.8.5], [https://packages.debian.org/stretch/gdc-4.9 4.9.3], [https://packages.debian.org/stretch/gdc-5 5.2.1]))<br />
*Unstable ([https://packages.debian.org/sid/gdc-4.8 4.8.5], [https://packages.debian.org/sid/gdc-4.9 4.9.3], [https://packages.debian.org/sid/gdc-5 5.2.1])<br />
|<br />
*Stable/Testing/Unstable (0.14.0)<br />
*Experimental (0.15.1)<br />
|---<br />
!Ubuntu<br />
|<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
*[http://d-apt.sourceforge.net APT repository] (2.068.0)<br />
|<br />
*14.04 ([http://packages.ubuntu.com/trusty-updates/gdc-4.8 4.8.4])<br />
*15.04 ([http://packages.ubuntu.com/vivid/gdc-4.8 4.8.4], [http://packages.ubuntu.com/vivid/gdc-4.9 4.9.2])<br />
*15.10 ([http://packages.ubuntu.com/wily/gdc-4.8 4.8.5], [http://packages.ubuntu.com/wily/gdc-4.9 4.9.3], [http://packages.ubuntu.com/wily/gdc-5 5.2.1])<br />
|<br />
*15.04 ([http://packages.ubuntu.com/vivid/ldc 0.14.0])<br />
*15.10 ([http://packages.ubuntu.com/wily/ldc 0.14.0])<br />
|---<br />
!Fedora<br />
|<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
|<br />
|<br />
See https://apps.fedoraproject.org/packages/ldc<br />
*21 (0.13.0)<br />
*22 (0.15.1)<br />
*23 (0.15.2.beta1)<br />
*Rawhide (0.16.0.alpha3)<br />
|---<br />
!OpenSuse<br />
|<br />
*[https://build.opensuse.org/package/show/devel:languages:D/dmd devel:languages:D] (2.068.2)<br />
|<br />
|<br />
*[https://build.opensuse.org/project/show/devel:languages:D devel:languages:D] (0.15.1)<br />
*[https://build.opensuse.org/project/show/home:marc_schuetz:branches:devel:languages:D home:marc_schuetz] (0.15.2-beta2)<br />
|---<br />
!CentOS<br />
|<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
|<br />
|<br />
|---<br />
!Arch Linux<br />
|<br />
*Community (2.068.2)<br />
|<br />
*Community (5.2.0)<br />
*AUR ([https://aur.archlinux.org/packages/gdc-git/ git HEAD])<br />
|<br />
*Community (0.15.1)<br />
|---<br />
!Gentoo<br />
|colspan="3" align=center | see https://wiki.gentoo.org/wiki/Dlang<br />
|---<br />
!FreeBSD<br />
|<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
*Ports (2.067.0)<br />
|<br />
|<br />
|}<br />
<br />
<br />
[[Category:Compiler]]</div>DanOlsonhttps://wiki.dlang.org/?title=Compilers&diff=6882Compilers2015-10-27T05:19:46Z<p>DanOlson: /* Package and/or binary availability, by platform and compiler */</p>
<hr />
<div>__NOTOC__<br />
{{:Compilers_Widget}}<br />
<table style="width:100%;" cellspacing="10"><br />
<tr><br />
<td style="width:33%; vertical-align: top; padding: 10px 10px; background: #f9f9f9; border: 1px solid #ccc; border-top: 1px solid #eee; border-bottom: 2px solid #999;"><br />
= [[DMD|DMD &raquo;]] =<br />
'''Digital Mars D compiler''' <br/>The formal D compiler.<br />
<div style="text-align: right;">[[DMD|DMD Portal &raquo;]]</div><br />
</td><br />
<br />
<td style="width:33%; vertical-align: top; padding: 10px 10px; background: #f9f9f9; border: 1px solid #ccc; border-top: 1px solid #eee; border-bottom: 2px solid #999;"><br />
<br />
<br />
<br />
[[Category:Compiler]]<br />
<br />
= [[GDC|GDC &raquo;]] =<br />
'''GCC D compiler'''<br/><br />
Fast and open source.<br />
<div style="text-align: right;">[[GDC|GDC Portal &raquo;]]</div><br />
</td><br />
<br />
<td style="width:33%; vertical-align: top; padding: 10px 10px; background: #f9f9f9; border: 1px solid #ccc; border-top: 1px solid #eee; border-bottom: 2px solid #999;"><br />
= [[LDC|LDC &raquo;]] =<br />
'''LLVM D compiler'''<br/><br />
Fast and open source.<br />
<div style="text-align: right;">[[LDC|LDC Portal &raquo;]]</div><br />
</td><br />
<br />
</tr><br />
</table><br />
<br />
<br />
Also see: [[Experimental compilers]]<br />
<br />
<br />
== Which compiler should I use? ==<br />
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.<br />
<br />
== Comparison ==<br />
<br />
{| class="wikitable" style="width: 65em"<br />
!<br />
!DMD<br />
!GDC<br />
!LDC<br />
|---<br />
|'''Platforms'''<br />
|<br />
*Windows<br />
*Linux<br />
*OS X<br />
*FreeBSD<br />
|<br />
*Windows (alpha)<br />
*Linux<br />
*OS X (untested)<br />
*FreeBSD (untested)<br />
|<br />
*Windows<br />
*Linux<br />
*OS X<br />
*FreeBSD<br />
*OpenSolaris<br />
*iOS (experimental)<br />
|---<br />
<br />
|'''Architectures'''<br />
|<br />
* i386<br />
* amd64<br />
|<br />
Complete (runtime / standard library) support:<br />
* i386<br />
* amd64<br />
* x32<br />
* armel<br />
* armhf<br />
<br />
Partial or bare-metal only support (packages for gdc in [https://packages.debian.org/sid/gdc-5 debian]):<br />
* alpha<br />
* arm64 (aarch64)<br />
* hppa<br />
* hurd-i386<br />
* kfreebsd-amd64<br />
* kfreebsd-i386<br />
* m68k<br />
* mips<br />
* mipsel<br />
* ppc<br />
* pcc64<br />
* ppc64el<br />
* s390x<br />
* sparc64<br />
|<br />
Complete (runtime / standard library) support:<br />
* i386<br />
* amd64<br />
<br />
Near-complete support:<br />
* arm64 (aarch64)<br />
* ppc<br />
* ppc64<br />
* ppc64el<br />
* mips64<br />
<br />
Partial or bare-metal only support:<br />
* armel<br />
* armhf<br />
* mips<br />
* s390x<br />
|---<br />
|'''Distribution'''<br />
|<br />
*Source<br />
*Multi-platform source/binary archive<br />
*Multi-platform installer ([https://github.com/jacob-carlborg/dvm DVM])<br />
*Windows installer<br />
*OS X package (.dmg)<br />
*Debian/Ubuntu package (.deb)<br />
*Fedora package (.rpm)<br />
*OpenSUSE (.rpm) package<br />
*Debian/Ubuntu repository via http://d-apt.sourceforge.net<br />
*OS-X homebrew and macports repositories<br />
|<br />
*Source<br />
*Windows / Linux binary archive<br />
*Debian/Ubuntu repository<br />
*Gentoo repository<br />
*Archlinux repository<br />
|<br />
*Source<br />
*Linux / OS X binary archive<br />
*Debian/Ubuntu repository<br />
*Fedora repository<br />
*Gentoo repository<br />
|---<br />
|'''Backend'''<br />
| [https://github.com/D-Programming-Language/dmd/tree/master/src/backend DMD] ([http://digitalmars.com/download/freecompiler.html DMC] fork)<br />
| [http://gcc.gnu.org/ GCC]<br />
| [http://llvm.org/ LLVM]<br />
|---<br />
|'''License'''<br />
| Frontend: GPL 1 or later / Artistic License<br />
Backend: [https://github.com/D-Programming-Language/dmd/blob/master/src/backendlicense.txt custom]<br />
| GPL 3 or later<br />
| LDC-specific code: 3-clause BSD<br />
|---<br />
|'''Inline assembler'''<br />
|<br />
* DMD Intel-like syntax (i386/amd64)<br />
|<br />
* GCC syntax (all targets)<br />
|<br />
* DMD Intel-like syntax (i386/amd64)<br />
* GCC syntax (all targets)<br />
* [[LDC inline IR|LLVM inline IR]]<br />
|---<br />
|'''SIMD'''<br />
| Partial (?)<br />
| Partial (?)<br />
| Partial (?)<br />
|---<br />
|'''Phobos as a shared library'''<br />
|<br />
* Linux<br />
|<br />
|<br />
* Linux<br />
|---<br />
|'''Building D code as shared library'''<br />
|<br />
* Linux<br />
* Windows ?<br />
|<br />
|<br />
* Linux<br />
|---<br />
|'''Dynamic loading of D shared libraries'''<br />
|<br />
* Linux<br />
|<br />
|<br />
* Linux<br />
|---<br />
!colspan="4" align="center"|<br/>'''Linux specific'''<br />
|---<br />
|'''Object file format'''<br />
| ELF<br />
| ELF<br />
| ELF<br />
|---<br />
!colspan="4" align="center"|<br/>'''Mac specific'''<br />
|---<br />
|'''Object file format'''<br />
| Mach-O<br />
| Mach-O<br />
| Mach-O<br />
|---<br />
!colspan="4" align="center"|<br/>'''Windows specific'''<br />
|---<br />
|'''Object file format'''<br />
| OMF (32) / COFF (64)<br />
| COFF<br />
| COFF<br />
|}<br />
<br />
==Package and/or binary availability, by platform and compiler==<br />
<br />
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.<br />
<br />
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.<br />
<br />
Very old compilers are (mostly) omitted, as they are unlikely to be of interest to users.<br />
<br />
{| class="wikitable" style="width: 65em"<br />
!rowspan="2"|<br/>Platform<br />
!colspan="3" align="center"|Compiler<br />
|---<br />
!DMD<br />
!GDC<br />
!LDC<br />
|---<br />
!Windows<br />
|<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
*[https://chocolatey.org Chocolatey] (2.067.0, 2.068.1 available awaiting moderation)<br />
|<br />
*[http://gdcproject.org/downloads Manual download] (5.2.0 w/ dmd frontend 2.066.1)<br />
|<br />
*[https://github.com/ldc-developers/ldc/releases Manual download] (0.15.1, 0.15.2-beta2, 0.16.0-beta1)<br />
|---<br />
!OS X<br />
|<br />
*[http://brew.sh Homebrew] (2.068.2)<br />
*[https://www.macports.org MacPorts] (2.068.0)<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
|<br />
|<br />
*[http://brew.sh Homebrew] (0.16.0)<br />
*[https://github.com/ldc-developers/ldc/releases Manual download] (0.16.0)<br />
|---<br />
!iOS<br />
|<br />
|<br />
|<br />
*[https://github.com/smolt/ldc-iphone-dev/releases Manual download] (0.15.2 experimental)<br />
|---<br />
!Linux (generic)<br />
|<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
|<br />
*[http://gdcproject.org/downloads Manual download] (5.2.0 w/ dmd frontend 2.066.1)<br />
|<br />
*[https://github.com/ldc-developers/ldc/releases Manual download] (0.15.1, 0.15.2-beta2, 0.16.0-beta1)<br />
|---<br />
!Cross-platform<br />
|<br />
* [https://github.com/jacob-carlborg/dvm DVM] (Any version)<br />
|<br />
|<br />
|---<br />
!colspan="4" | Distribution-specific packages<br />
|---<br />
!Debian<br />
|<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
*[http://d-apt.sourceforge.net APT repository] (2.068.0)<br />
|<br />
*Stable ([https://packages.debian.org/jessie/gdc-4.8 4.8.4], [https://packages.debian.org/jessie/gdc-4.9 4.9.2])<br />
*Testing (([https://packages.debian.org/stretch/gdc-4.8 4.8.5], [https://packages.debian.org/stretch/gdc-4.9 4.9.3], [https://packages.debian.org/stretch/gdc-5 5.2.1]))<br />
*Unstable ([https://packages.debian.org/sid/gdc-4.8 4.8.5], [https://packages.debian.org/sid/gdc-4.9 4.9.3], [https://packages.debian.org/sid/gdc-5 5.2.1])<br />
|<br />
*Stable/Testing/Unstable (0.14.0)<br />
*Experimental (0.15.1)<br />
|---<br />
!Ubuntu<br />
|<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
*[http://d-apt.sourceforge.net APT repository] (2.068.0)<br />
|<br />
*14.04 ([http://packages.ubuntu.com/trusty-updates/gdc-4.8 4.8.4])<br />
*15.04 ([http://packages.ubuntu.com/vivid/gdc-4.8 4.8.4], [http://packages.ubuntu.com/vivid/gdc-4.9 4.9.2])<br />
*15.10 ([http://packages.ubuntu.com/wily/gdc-4.8 4.8.5], [http://packages.ubuntu.com/wily/gdc-4.9 4.9.3], [http://packages.ubuntu.com/wily/gdc-5 5.2.1])<br />
|<br />
*15.04 ([http://packages.ubuntu.com/vivid/ldc 0.14.0])<br />
*15.10 ([http://packages.ubuntu.com/wily/ldc 0.14.0])<br />
|---<br />
!Fedora<br />
|<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
|<br />
|<br />
See https://apps.fedoraproject.org/packages/ldc<br />
*21 (0.13.0)<br />
*22 (0.15.1)<br />
*23 (0.15.2.beta1)<br />
*Rawhide (0.16.0.alpha3)<br />
|---<br />
!OpenSuse<br />
|<br />
*[https://build.opensuse.org/package/show/devel:languages:D/dmd devel:languages:D] (2.068.2)<br />
|<br />
|<br />
*[https://build.opensuse.org/project/show/devel:languages:D devel:languages:D] (0.15.1)<br />
*[https://build.opensuse.org/project/show/home:marc_schuetz:branches:devel:languages:D home:marc_schuetz] (0.15.2-beta2)<br />
|---<br />
!CentOS<br />
|<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
|<br />
|<br />
|---<br />
!Arch Linux<br />
|<br />
*Community (2.068.2)<br />
|<br />
*Community (5.2.0)<br />
*AUR ([https://aur.archlinux.org/packages/gdc-git/ git HEAD])<br />
|<br />
*Community (0.15.1)<br />
|---<br />
!Gentoo<br />
|colspan="3" align=center | see https://wiki.gentoo.org/wiki/Dlang<br />
|---<br />
!FreeBSD<br />
|<br />
*[http://dlang.org/download.html Manual download] (2.068.2)<br />
*Ports (2.067.0)<br />
|<br />
|<br />
|}<br />
<br />
<br />
[[Category:Compiler]]</div>DanOlsonhttps://wiki.dlang.org/?title=LDC&diff=6836LDC2015-10-26T06:11:58Z<p>DanOlson: /* iOS (iPhone OS) */</p>
<hr />
<div>{{:Compilers_Widget}}<br />
<br />
The LDC project aims to provide a portable D programming language compiler with modern optimization and code generation capabilities. The compiler uses the official DMD frontend to support the latest D2 version and relies on the [http://llvm.org LLVM Core libraries] for code generation.<br />
<br />
LDC is fully Open Source; the parts of the code not taken/adapted from other projects are BSD-licensed (see the [https://github.com/ldc-developers/ldc/blob/master/LICENSE LICENSE] file for details).<br />
<br />
D1 is no longer supported in the current development tree; the last version supporting it can be found at the <tt>[https://github.com/ldc-developers/ldc/tree/d1 d1]</tt> Git branch.<br />
<br />
== Getting started ==<br />
* [https://github.com/ldc-developers/ldc/releases Latest binary releases] and [http://forum.dlang.org/post/yefpjkfouykvwkjiltxj@forum.dlang.org related forum thread]<br />
* [[Building LDC from source]]<br />
* [[Building LDC on MinGW x86]]<br />
* [[Building and hacking LDC on Windows using MSVC]]<br />
* [[Installing LDC on Gentoo]] - [https://wiki.gentoo.org/wiki/Dlang Official Dlang Gentoo overlay]<br />
* [[Using LDC]] ([[LDC-specific language changes]] — [[LDC inline assembly expressions]] — [[LDC inline IR]])<br />
* [[Reporting LDC issues]] — [[LDC contributor's guide]]<br />
<br />
== Project status ==<br />
In general, LDC should ''work fine on most x86/x86-64 Unix-like systems'', including Linux, OS X 10.7+, Solaris and most BSD flavors. Code generation should work for other platforms supported by the LLVM MC codegen infrastructure (for example ARM), but druntime/Phobos support will most likely be lacking.<br />
<br />
=== x86 Windows using MinGW ===<br />
<br />
* LDC 2 from Git master compiles and builds druntime/Phobos, but requires recent MinGW and LLVM versions for a few critical bug fixes. See [[Building LDC on MinGW x86]].<br />
* Most programs work just fine (including TLS and exception handling).<br />
* A small number of remaining test cases still fails, but many of the harder issues (<tt>real</tt> math precision, MS C runtime-caused problems, ABI differences) have already been solved.<br />
* Estimate for making Windows x86/MinGW a »first class« target: 1 weekend of focused work, plus a Windows CI slave.<br />
<br />
=== x86-64 Windows using MSVC ===<br />
<br />
* LDC2 from master branch compiles cleanly.<br />
* LLVM 3.7 (current trunk) is required.<br />
* See [[Building and hacking LDC on Windows using MSVC]] for detailed instructions.<br />
* There are no compile issues in druntime and phobos.<br />
* Several unit tests still fail: https://github.com/ldc-developers/ldc/issues/758<br />
* Contact: kai@redstar.de<br />
* See also [[Latest pre-built LDC for Win64]]<br />
<br />
=== OS X ===<br />
* OS X version prior to 10.7 (Lion) are not supported in D2, because LLVM's thread-local storage support depends on functionality introduced in 10.7.<br />
* homebrew users can install ldc with <tt>brew install ldc</tt> for the latest stable release or <tt>brew install ldc --devel</tt> for the latest beta / release candidate.<br />
<br />
=== ARM ===<br />
<br />
* LDC from Git master is able to build a working Phobos "Hello World" application.<br />
* LLVM 3.4 is required, there are many known bugs affecting ARM in older versions.<br />
* EH support is still broken, and there are many other severe bugs: https://github.com/ldc-developers/ldc/issues?labels=B-arm&state=open<br />
* Android has not been tested yet and most likely does not even compile.<br />
* LDC has successfully been used to create a minimal free-standing ARM Cortex-M binary, see [[Minimal semihosted ARM Cortex-M %22Hello_World%22]].<br />
<br />
=== AArch64 ===<br />
<br />
* LDC from Git branch merge-2.067 is able to build a working Druntime "Hello World" application.<br />
* LLVM 3.6 is required, there are many known bugs affecting AArch64 in older versions.<br />
* All Druntime unit tests pass! There is still an issue with core.stdc.stdarg which prevents successful compilation of Phobos.<br />
<br />
=== iOS (iPhone OS) ===<br />
<br />
* Compiling D code for iOS is possible now, but it is experimental and not part of LDC main.<br />
* Full druntime/phobos support<br />
* Supports 32/64-bit ARM devices and iOS Simulator<br />
* See https://github.com/smolt/ldc-iphone-dev. The README.md explains what is available and what is missing.<br />
* Releases available: https://github.com/smolt/ldc-iphone-dev/releases<br />
<br />
=== PowerPC 32-bit ===<br />
<br />
* Requires at least LLVM 3.4 because of [http://llvm.org/bugs/show_bug.cgi?id=16556 PR16556]<br />
* TLS support only for LocalExec model, see [http://llvm.org/bugs/show_bug.cgi?id=16555 PR16555]<br />
* Code generation is known to work.<br />
* There are no compile issues in druntime and phobos.<br />
* Linux/PPC32 specific implementations are missing: core.cpuid, std.internal.math.bigintppc32, ...<br />
* More testing is needed.<br />
* Contact: kai@redstar.de<br />
<br />
=== PowerPC 64-bit Big Endian and Little Endian ===<br />
<br />
* PPPC64 Big Endian requires at least LLVM 3.4. PPC64 Little Endian requires at least LLVM 3.5. Both are affected by [http://llvm.org/bugs/show_bug.cgi?id=21443 PR21443].<br />
* Only Linux because LLVM does not cleanly compile on AIX.<br />
* Code generation is known to work.<br />
* There are no compile issues in druntime and phobos.<br />
* There are still some test failures. Most of the failures are related to math precision (e.g. unit test expects 80bit reals)<br />
* Linux/PPC64 specific implementations are missing: core.cpuid, std.internal.math.bigintppc64, ...<br />
* Multi-lib build is possible on Linux/PPC64 Big Endian.<br />
* More testing is needed.<br />
* Contact: kai@redstar.de<br />
<br />
=== MIPS64 ===<br />
<br />
* Requires at least LLVM 3.6, LLVM 3.7 preferred.<br />
* LDC and druntime compile cleanly but there are some issues in phobos with std.math.<br />
* There seems to be an issue with ld and the integrated assembler: ld segfaults with binaries generated by ldc.<br />
* Known failures with LLVM 3.7: std.math (SROA assert, optimization only), std.bitmap (assert in SelectionDAG), ...<br />
* Current target is N32/N64 ABI.<br />
* Contact: kai@redstar.de<br />
<br />
== Contributing ==<br />
<br />
LDC is an entirely community-driven effort, so all contributions are warmly welcomed. The easiest way to help with development is to write high-quality '''bug reports''' for any issues you run into. For a quick guide on what a useful report should contain, please see [[Reporting LDC issues]].<br />
<br />
If you are interested in getting into compiler development, anecdotal evidence suggests that hacking on LDC might be a nice first step, particularly because the LLVM backend is very comfortable to work with. To get started, just browse through the issue list, find a ticket that tickles your fancy (some of them are specifically marked as "junior jobs"), and work on a fix – and of course don't hesitate to ask for advice at the mailing list or on IRC. An '''[[LDC_contributor's_guide|LDC contributor's guide]]''' is in the works. Have a look at [[LDC project ideas]] for a list of features/improvements to add to LDC.<br />
<br />
We would also be excited to see LDC '''packages''' in more OS distributions, particular Debian and its derivatives. So, if you think you might be able to help, please just drop us a line at the development mailing list. We will actively try to make packaging as smooth as possible, but besides the fact that upstream-maintained packages are sometimes discouraged, it is hard to build good packages for a system you don't know well, so we need to rely on external contributors here.<br />
<br />
== Presentations ==<br />
<br />
LDC is an active project and the team promotes the use of D and LDC.<br />
<br />
* David's [http://dconf.org/2013/talks/nadlinger.html talk about LDC] at [http://dconf.org/2013/index.html DConf 2013]: [http://dconf.org/2013/talks/nadlinger.pdf Slides] [http://archive.org/details/dconf2013-day03-talk04 Video HD] [http://youtube.com/watch?v=ntdKZWSiJdY Video SD]<br />
* Kai's [https://archive.fosdem.org/2014/schedule/event/ldccompiler/ talk about LDC] in the [https://archive.fosdem.org/2014/schedule/track/llvm/ LLVM devroom] at [https://archive.fosdem.org/2014/ FOSDEM'14]: [https://archive.fosdem.org/2014/schedule/event/ldccompiler/attachments/slides/365/export/events/attachments/ldccompiler/slides/365/FOSDEM_2014.pptx Slides (PPTX)] [https://archive.fosdem.org/2014/schedule/event/ldccompiler/attachments/slides/366/export/events/attachments/ldccompiler/slides/366/FOSDEM_2014.pdf Slides (PDF)] [http://video.fosdem.org/2014/K4401/Sunday/LDC_the_LLVMbased_D_compiler.webm Video]<br />
* Kai's [https://archive.fosdem.org/2015/schedule/event/llvm_internal_asm/ talk about the LLVM assembler] in the [https://archive.fosdem.org/2015/schedule/track/llvm_toolchain/ LLVM toolchain devroom] at [https://archive.fosdem.org/2015/ FOSDEM'15]: [https://archive.fosdem.org/2015/schedule/event/llvm_internal_asm/attachments/slides/711/export/events/attachments/llvm_internal_asm/slides/711/Nacke_Extending_Assembler.pdf Slides] [http://video.fosdem.org/2015/devroom-llvm_toolchain/internal_asm__CAM_ONLY_PARTIAL_AUDIO.mp4 Video]<br />
* David's [http://dconf.org/2015/talks/nadlinger.html talk about DRuntime] at [http://dconf.org/2015/index.html DConf 2015]: [http://dconf.org/2015/talks/nadlinger.pdf Slides] [http://dconf.org/2015/talks/nadlinger.html Video HD] [https://www.youtube.com/watch?v=rmRmfoKxMCE Video SD]<br />
<br />
== Useful Links ==<br />
* [https://github.com/ldc-developers/ldc/issues Issue tracker (GitHub)]<br />
* [https://github.com/ldc-developers/ldc Source code (GitHub)]<br />
* [http://forum.dlang.org/group/digitalmars.D.ldc LDC discussion forum] (also available via NNTP and a mailing list interface, see the forum index)<br />
* [irc://irc.freenode.net/ldc LDC IRC channel] (#ldc on [http://freenode.net Freenode])<br />
<br />
[[Category:LDC]]</div>DanOlsonhttps://wiki.dlang.org/?title=LDC&diff=6345LDC2015-07-10T06:31:19Z<p>DanOlson: /* iOS (iPhone OS) */</p>
<hr />
<div>{{:Compilers_Widget}}<br />
<br />
The LDC project aims to provide a portable D programming language compiler with modern optimization and code generation capabilities. The compiler uses the official DMD frontend to support the latest D2 version and relies on the [http://llvm.org LLVM Core libraries] for code generation.<br />
<br />
LDC is fully Open Source; the parts of the code not taken/adapted from other projects are BSD-licensed (see the [https://github.com/ldc-developers/ldc/blob/master/LICENSE LICENSE] file for details).<br />
<br />
D1 is no longer supported in the current development tree; the last version supporting it can be found at the <tt>[https://github.com/ldc-developers/ldc/tree/d1 d1]</tt> Git branch.<br />
<br />
== Getting started ==<br />
* [https://github.com/ldc-developers/ldc/releases Latest binary releases] and [http://forum.dlang.org/post/yefpjkfouykvwkjiltxj@forum.dlang.org related forum thread]<br />
* [[Building LDC from source]]<br />
* [[Building LDC on MinGW x86]]<br />
* [[Building and hacking LDC on Windows using MSVC]]<br />
* [[Installing LDC on Gentoo]] - [https://wiki.gentoo.org/wiki/Dlang Official Dlang Gentoo overlay]<br />
* [[Using LDC]] ([[LDC-specific language changes]] — [[LDC inline assembly expressions]] — [[LDC inline IR]])<br />
* [[Reporting LDC issues]] — [[LDC contributor's guide]]<br />
<br />
== Project status ==<br />
In general, LDC should ''work fine on most x86/x86-64 Unix-like systems'', including Linux, OS X 10.7+ and most BSD flavors. Code generation should work for other platforms supported by the LLVM MC codegen infrastructure (for example ARM), but druntime/Phobos support will most likely be lacking.<br />
<br />
=== x86 Windows using MinGW ===<br />
<br />
* LDC 2 from Git master compiles and builds druntime/Phobos, but requires recent MinGW and LLVM versions for a few critical bug fixes. See [[Building LDC on MinGW x86]].<br />
* Most programs work just fine (including TLS and exception handling).<br />
* A small number of remaining test cases still fails, but many of the harder issues (<tt>real</tt> math precision, MS C runtime-caused problems, ABI differences) have already been solved.<br />
* Estimate for making Windows x86/MinGW a »first class« target: 1 weekend of focused work, plus a Windows CI slave.<br />
<br />
=== x86-64 Windows using MSVC ===<br />
<br />
* LDC2 from master branch compiles cleanly.<br />
* LLVM 3.6 (current trunk) is required.<br />
* See [[Building and hacking LDC on Windows using MSVC]] for detailed instructions.<br />
* There are no compile issues in druntime and phobos.<br />
* Several unit tests still fail: https://github.com/ldc-developers/ldc/issues/758<br />
* Contact: kai@redstar.de<br />
<br />
=== OS X ===<br />
* OS X version prior to 10.7 (Lion) are not supported in D2, because LLVM's thread-local storage support depends on functionality introduced in 10.7.<br />
* homebrew users can install ldc with <tt>brew install ldc</tt> for the latest stable release or <tt>brew install ldc --devel</tt> for the latest beta / release candidate.<br />
<br />
=== ARM ===<br />
<br />
* LDC from Git master is able to build a working Phobos "Hello World" application.<br />
* LLVM 3.4 is required, there are many known bugs affecting ARM in older versions.<br />
* EH support is still broken, and there are many other severe bugs: https://github.com/ldc-developers/ldc/issues?labels=B-arm&state=open<br />
* Android has not been tested yet and most likely does not even compile.<br />
* LDC has successfully been used to create a minimal free-standing ARM Cortex-M binary, see [[Minimal semihosted ARM Cortex-M %22Hello_World%22]].<br />
<br />
=== AArch64 ===<br />
<br />
* LDC from Git branch merge-2.067 is able to build a working Druntime "Hello World" application.<br />
* LLVM 3.6 is required, there are many known bugs affecting AArch64 in older versions.<br />
* All Druntime unit tests pass! There is still an issue with core.stdc.stdarg which prevents successful compilation of Phobos.<br />
<br />
=== iOS (iPhone OS) ===<br />
<br />
* Compiling D code for iOS is possible now, but it is experimental and not part of LDC main.<br />
* Full druntime/phobos support<br />
* Supports 32-bit ARM devices and iOS Simulator (arm64 coming soon...)<br />
* See https://github.com/smolt/ldc-iphone-dev. The README.md explains what is available and what is missing.<br />
* Releases available: https://github.com/smolt/ldc-iphone-dev/releases<br />
<br />
=== PowerPC 32-bit ===<br />
<br />
* Requires at least LLVM 3.4 because of [http://llvm.org/bugs/show_bug.cgi?id=16556 PR16556]<br />
* TLS support only for LocalExec model, see [http://llvm.org/bugs/show_bug.cgi?id=16555 PR16555]<br />
* Code generation is known to work.<br />
* There are no compile issues in druntime and phobos.<br />
* Linux/PPC32 specific implementations are missing: core.cpuid, std.internal.math.bigintppc32, ...<br />
* More testing is needed.<br />
* Contact: kai@redstar.de<br />
<br />
=== PowerPC 64-bit Big Endian and Little Endian ===<br />
<br />
* PPPC64 Big Endian requires at least LLVM 3.4. PPC64 Little Endian requires at least LLVM 3.5. Both are affected by [http://llvm.org/bugs/show_bug.cgi?id=21443 PR21443].<br />
* Only Linux because LLVM does not cleanly compile on AIX.<br />
* Code generation is known to work.<br />
* There are no compile issues in druntime and phobos.<br />
* There are still some test failures. Most of the failures are related to math precision (e.g. unit test expects 80bit reals)<br />
* Linux/PPC64 specific implementations are missing: core.cpuid, std.internal.math.bigintppc64, ...<br />
* Multi-lib build is possible on Linux/PPC64 Big Endian.<br />
* More testing is needed.<br />
* Contact: kai@redstar.de<br />
<br />
=== MIPS64 ===<br />
<br />
* Requires at least LLVM 3.6, LLVM 3.7 preferred.<br />
* LDC and druntime compile cleanly but there are some issues in phobos with std.math.<br />
* There seems to be an issue with ld and the integrated assembler: ld segfaults with binaries generated by ldc.<br />
* Known failures with LLVM 3.7: std.math (SROA assert, optimization only), std.bitmap (assert in SelectionDAG), ...<br />
* Current target is N32/N64 ABI.<br />
* Contact: kai@redstar.de<br />
<br />
== Contributing ==<br />
<br />
LDC is an entirely community-driven effort, so all contributions are warmly welcomed. The easiest way to help with development is to write high-quality '''bug reports''' for any issues you run into. For a quick guide on what a useful report should contain, please see [[Reporting LDC issues]].<br />
<br />
If you are interested in getting into compiler development, anecdotal evidence suggests that hacking on LDC might be a nice first step, particularly because the LLVM backend is very comfortable to work with. To get started, just browse through the issue list, find a ticket that tickles your fancy (some of them are specifically marked as "junior jobs"), and work on a fix – and of course don't hesitate to ask for advice at the mailing list or on IRC. An '''[[LDC_contributor's_guide|LDC contributor's guide]]''' is in the works. Have a look at [[LDC project ideas]] for a list of features/improvements to add to LDC.<br />
<br />
We would also be excited to see LDC '''packages''' in more OS distributions, particular Debian and its derivatives. So, if you think you might be able to help, please just drop us a line at the development mailing list. We will actively try to make packaging as smooth as possible, but besides the fact that upstream-maintained packages are sometimes discouraged, it is hard to build good packages for a system you don't know well, so we need to rely on external contributors here.<br />
<br />
== Useful Links ==<br />
* [https://github.com/ldc-developers/ldc/issues Issue tracker (GitHub)]<br />
* [https://github.com/ldc-developers/ldc Source code (GitHub)]<br />
* [http://forum.dlang.org/group/digitalmars.D.ldc LDC discussion forum] (also available via NNTP and a mailing list interface, see the forum index)<br />
* [irc://irc.freenode.net/ldc LDC IRC channel] (#ldc on [http://freenode.net Freenode])<br />
<br />
[[Category:LDC]]</div>DanOlsonhttps://wiki.dlang.org/?title=LDC&diff=5818LDC2015-04-06T15:04:52Z<p>DanOlson: Status of LDC for iOS</p>
<hr />
<div>{{:Compilers_Widget}}<br />
<br />
The LDC project aims to provide a portable D programming language compiler with modern optimization and code generation capabilities. The compiler uses the official DMD frontend to support the latest D2 version and relies on the [http://llvm.org LLVM Core libraries] for code generation.<br />
<br />
LDC is fully Open Source; the parts of the code not taken/adapted from other projects are BSD-licensed (see the [https://github.com/ldc-developers/ldc/blob/master/LICENSE LICENSE] file for details).<br />
<br />
D1 is no longer supported in the current development tree; the last version supporting it can be found at the <tt>[https://github.com/ldc-developers/ldc/tree/d1 d1]</tt> Git branch.<br />
<br />
== Getting started ==<br />
* [https://github.com/ldc-developers/ldc/releases Latest binary releases] and [http://forum.dlang.org/post/yefpjkfouykvwkjiltxj@forum.dlang.org related forum thread]<br />
* [[Building LDC from source]]<br />
* [[Building LDC on MinGW x86]]<br />
* [[Building and hacking LDC on Windows using MSVC]]<br />
* [[Installing LDC on Gentoo]] - [https://wiki.gentoo.org/wiki/Dlang Official Dlang Gentoo overlay]<br />
* [[Using LDC]] ([[LDC-specific language changes]] — [[LDC inline assembly expressions]] — [[LDC inline IR]])<br />
* [[Reporting LDC issues]] — [[LDC contributor's guide]]<br />
<br />
== Project status ==<br />
In general, LDC should ''work fine on most x86/x86-64 Unix-like systems'', including Linux, OS X 10.7+ and most BSD flavors. Code generation should work for other platforms supported by the LLVM MC codegen infrastructure (for example ARM), but druntime/Phobos support will most likely be lacking.<br />
<br />
=== x86 Windows using MinGW ===<br />
<br />
* LDC 2 from Git master compiles and builds druntime/Phobos, but requires recent MinGW and LLVM versions for a few critical bug fixes. See [[Building LDC on MinGW x86]].<br />
* Most programs work just fine (including TLS and exception handling).<br />
* A small number of remaining test cases still fails, but many of the harder issues (<tt>real</tt> math precision, MS C runtime-caused problems, ABI differences) have already been solved.<br />
* Estimate for making Windows x86/MinGW a »first class« target: 1 weekend of focused work, plus a Windows CI slave.<br />
<br />
=== x86-64 Windows using MSVC ===<br />
<br />
* LDC2 from master branch compiles cleanly.<br />
* LLVM 3.6 (current trunk) is required.<br />
* See [[Building and hacking LDC on Windows using MSVC]] for detailed instructions.<br />
* There are no compile issues in druntime and phobos.<br />
* Several unit tests still fail: https://github.com/ldc-developers/ldc/issues/758<br />
* Contact: kai@redstar.de<br />
<br />
=== OS X ===<br />
* OS X version prior to 10.7 (Lion) are not supported in D2, because LLVM's thread-local storage support depends on functionality introduced in 10.7.<br />
* homebrew users can install ldc with <tt>brew install ldc</tt> for the latest stable release or <tt>brew install ldc --devel</tt> for the latest beta / release candidate.<br />
<br />
=== ARM ===<br />
<br />
* LDC from Git master is able to build a working Phobos "Hello World" application.<br />
* LLVM 3.4 is required, there are many known bugs affecting ARM in older versions.<br />
* EH support is still broken, and there are many other severe bugs: https://github.com/ldc-developers/ldc/issues?labels=B-arm&state=open<br />
* Android has not been tested yet and most likely does not even compile.<br />
* LDC has successfully been used to create a minimal free-standing ARM Cortex-M binary, see [[Minimal semihosted ARM Cortex-M %22Hello_World%22]].<br />
<br />
=== iOS (iPhone OS) ===<br />
<br />
* Compiling D code targeting iOS is possible now, but it is experimental and not part of LDC main.<br />
* Full druntime/phobos support<br />
* Only supports armv7.<br />
* See https://github.com/smolt/ldc-iphone-dev. The README.md explains what is available and what is missing.<br />
<br />
=== PowerPC 32-bit ===<br />
<br />
* Requires at least LLVM 3.4 because of [http://llvm.org/bugs/show_bug.cgi?id=16556 PR16556]<br />
* TLS support only for LocalExec model, see [http://llvm.org/bugs/show_bug.cgi?id=16555 PR16555]<br />
* Code generation is known to work.<br />
* There are no compile issues in druntime and phobos.<br />
* Linux/PPC32 specific implementations are missing: core.cpuid, std.internal.math.bigintppc32, ...<br />
* More testing is needed.<br />
* Contact: kai@redstar.de<br />
<br />
=== PowerPC 64-bit Big Endian and Little Endian ===<br />
<br />
* PPPC64 Big Endian requires at least LLVM 3.4. PPC64 Little Endian requires at least LLVM 3.5. Both are affected by [http://llvm.org/bugs/show_bug.cgi?id=21443 PR21443].<br />
* Only Linux because LLVM does not cleanly compile on AIX.<br />
* Code generation is known to work.<br />
* There are no compile issues in druntime and phobos.<br />
* There are still some test failures. Most of the failures are related to math precision (e.g. unit test expects 80bit reals)<br />
* Linux/PPC64 specific implementations are missing: core.cpuid, std.internal.math.bigintppc64, ...<br />
* Multi-lib build is possible on Linux/PPC64 Big Endian.<br />
* More testing is needed.<br />
* Contact: kai@redstar.de<br />
<br />
=== MIPS64 ===<br />
<br />
* Requires at least LLVM 3.5.<br />
* LDC compiles cleanly but there are some issues in druntime and phobos (mostly vararg related).<br />
* Current target is N64 ABI.<br />
* Contact: kai@redstar.de<br />
<br />
== Contributing ==<br />
<br />
LDC is an entirely community-driven effort, so all contributions are warmly welcomed. The easiest way to help with development is to write high-quality '''bug reports''' for any issues you run into. For a quick guide on what a useful report should contain, please see [[Reporting LDC issues]].<br />
<br />
If you are interested in getting into compiler development, anecdotal evidence suggests that hacking on LDC might be a nice first step, particularly because the LLVM backend is very comfortable to work with. To get started, just browse through the issue list, find a ticket that tickles your fancy (some of them are specifically marked as "junior jobs"), and work on a fix – and of course don't hesitate to ask for advice at the mailing list or on IRC. An '''[[LDC contributor's guide]]''' is in the works.<br />
<br />
We would also be excited to see LDC '''packages''' in more OS distributions, particular Debian and its derivatives. So, if you think you might be able to help, please just drop us a line at the development mailing list. We will actively try to make packaging as smooth as possible, but besides the fact that upstream-maintained packages are sometimes discouraged, it is hard to build good packages for a system you don't know well, so we need to rely on external contributors here.<br />
<br />
== Useful Links ==<br />
* [https://github.com/ldc-developers/ldc/issues Issue tracker (GitHub)]<br />
* [https://github.com/ldc-developers/ldc Source code (GitHub)]<br />
* [http://forum.dlang.org/group/digitalmars.D.ldc LDC discussion forum] (also available via NNTP and a mailing list interface, see the forum index)<br />
* [irc://irc.freenode.net/ldc LDC IRC channel] (#ldc on [http://freenode.net Freenode])<br />
<br />
[[Category:LDC]]</div>DanOlson