Difference between revisions of "Compilers"

From D Wiki
Jump to: navigation, search
m (Comparison: Fix table style)
(Comparison: Some fixes / additions)
Line 66: Line 66:
 
* i386
 
* i386
 
* amd64
 
* amd64
 
 
|
 
|
 
* i386
 
* i386
 
* amd64
 
* amd64
 
|---
 
|---
|'''Installation'''
+
|'''Distribution'''
| Source, Archives with binaries, Linux packages
+
| Source, multi-platform source/binary archive, Windows installer, packages for OS X (.dmg), Debian (.deb), Fedora (.rpm), OpenSUSE (.rpm)
| Source, Linux packages
+
| Source, Windows binary archive, Debian/Ubuntu repository
| Source, Archives with binaries, Linux Packages
+
| Source, Linux / OS X binary archive, Debian/Ubuntu repository, Fedora repository
 
|---
 
|---
 
|'''Backend'''
 
|'''Backend'''
| DMD
+
| [https://github.com/D-Programming-Language/dmd/tree/master/src/backend DMD] ([http://digitalmars.com/download/freecompiler.html DMC] fork)
| GCC
+
| [GCC http://gcc.gnu.org/]
| LLVM
+
| [LLVM http://llvm.org/]
 
|---
 
|---
 
|'''License'''
 
|'''License'''
Line 107: Line 106:
 
|---
 
|---
 
|'''Object file format'''
 
|'''Object file format'''
| OMF
+
| ?
| PE/COFF
+
| ?
| PE/COFF
+
| ?
 
|---
 
|---
 
!colspan="4" align="center"|<br/>'''Windows specific'''
 
!colspan="4" align="center"|<br/>'''Windows specific'''
 
|---
 
|---
 
|'''Object file format'''
 
|'''Object file format'''
| ?
+
| OMF (32) / COFF (64)
| ?
+
| COFF
| ?
+
| COFF
 
|}
 
|}

Revision as of 20:39, 5 July 2013

Compilers: OverviewDMDGDCLDC

DMD »

Digital Mars D compiler
The formal D compiler.

GDC »

GCC D compiler
Fast and open source.

LDC »

LLVM D compiler
Fast and open source.


Also see: Experimental compilers


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
  • Linux
  • Mac
  • FreeBSD
  • Win
  • Linux
  • Mac
  • FreeBSD
  • Win
  • Linux
  • Mac
  • FreeBSD
  • Win
Architectures
  • i386
  • amd64
  • i386
  • amd64
  • i386
  • amd64
Distribution Source, multi-platform source/binary archive, Windows installer, packages for OS X (.dmg), Debian (.deb), Fedora (.rpm), OpenSUSE (.rpm) Source, Windows binary archive, Debian/Ubuntu repository Source, Linux / OS X binary archive, Debian/Ubuntu repository, Fedora repository
Backend DMD (DMC fork) [GCC http://gcc.gnu.org/] [LLVM http://llvm.org/]
License Frontend: GPL 1 or later / Artistic License

Backend: custom

GPL 3 or later LDC-specific code: 3-clause BSD
Inline assembler Yes, x86 Yes, GCC-style only (all targets) Yes, D-style (x86) and GCC-style (all targets)
SIMD Partial (?) Partial (?) Partial (?)

Linux specific
Object file format ELF ELF ELF

Mac specific
Object file format ? ? ?

Windows specific
Object file format OMF (32) / COFF (64) COFF COFF