Difference between revisions of "Compilers"
Klickverbot (talk | contribs) |
(Add licenses, add gdc inline asm info) |
||
Line 82: | Line 82: | ||
|--- | |--- | ||
|'''License''' | |'''License''' | ||
− | | | + | | Frontend: GPL 1 or later / Artistic License |
− | | | + | Backend: [https://github.com/D-Programming-Language/dmd/blob/master/src/backendlicense.txt custom] |
+ | | GPL 3 or later | ||
| LDC-specific code: 3-clause BSD | | LDC-specific code: 3-clause BSD | ||
|--- | |--- | ||
|'''Inline assembler''' | |'''Inline assembler''' | ||
| Yes, x86 | | Yes, x86 | ||
− | | | + | | Yes, GCC-style only (all targets) |
| Yes, D-style (x86) and GCC-style (all targets) | | Yes, D-style (x86) and GCC-style (all targets) | ||
|--- | |--- |
Revision as of 13:10, 17 January 2013
DMD »Digital Mars D compiler |
GDC »GCC D compiler |
LDC »LLVM D compiler |
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 |
|
|
|
Architectures |
|
|
|
Installation | Automatic | ? | ? |
Backend | DMD | GCC | LLVM |
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 | ? | ? | ? |
Mac specific | |||
Object file format | ? | ? | ? |
Windows specific | |||
Object file format | ? | ? | ? |