Using LDC

From D Wiki
Revision as of 21:34, 16 December 2012 by Klickverbot (talk | contribs) (Initial draft – needs work!)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Generally, LDC should be straightforward to use, like any other compiler. It comes with two different »drivers«, i.e. executables a user invokes to compile D code: ldc2, which offers many customization options, some of which are internal to LLVM, and ldmd2, which tries to accurately replicate the DMD command line interface and can be used as a drop-in replacement for DMD.

Configuration file search path

LDC looks for a file called ldc.conf resp. ldc2.conf in the follow directories in order:

  1. current working directory
  2. next to binary
  3. ~/.ldc
  4. user home directory (Windows-only)
  5. in an etc directory next to the directory where the binary resides
  6. install-prefix (Windows-only)
  7. install-prefix/etc
  8. install-prefix/etc/ldc
  9. /etc
  10. /etc/ldc