The LLVM-based D Compiler.
Find a file
Elie Morisse dcad25d6fd Debug info: for extern(D) functions whose order of explicit arguments gets reversed, set the calling convention to DW_CC_D_dmd.
DW_CC_D_dmd is set to the first available value according to https://gcc.gnu.org/wiki/GNUDwarfExtensions. A GDB patch to handle this calling convention is being proposed.
2018-10-15 23:17:24 +02:00
.circleci Upgrade LLVM to v7.0.0 2018-09-26 17:21:35 +02:00
.semaphoreci Semaphore: Add missing -DCMAKE_BUILD_TYPE=Release in CMake cmdline (#2807) 2018-08-09 20:14:03 +02:00
bash_completion.d
cmake/Modules Fix compilation issues on macOS with DMD host compiler >= 2.079 2018-05-19 16:31:42 +02:00
dmd Merge upstream stable (0e308f5ac1) (#2858) 2018-09-29 00:05:01 +02:00
docs some docs 2018-09-06 21:22:10 +03:00
driver Raise min LLVM version to 3.9 (#2872) 2018-10-15 22:31:59 +02:00
gen Debug info: for extern(D) functions whose order of explicit arguments gets reversed, set the calling convention to DW_CC_D_dmd. 2018-10-15 23:17:24 +02:00
ir Debug info: move the IrTypeAggr::diCompositeType field into IrAggr to get it reset when emitting a new module 2018-10-15 23:10:22 +02:00
res Upgrade to D v2.079.0-beta.1 2018-02-20 02:04:41 +01:00
runtime Raise min LLVM version to 3.9 (#2872) 2018-10-15 22:31:59 +02:00
tests Debug info: add a GDB test case covering latest commits (printing global and imported symbols, static variables, non-member/member function calls). 2018-10-15 23:17:22 +02:00
tools Raise min LLVM version to 3.9 (#2872) 2018-10-15 22:31:59 +02:00
utils Raise min LLVM version to 3.9 (#2872) 2018-10-15 22:31:59 +02:00
vcbuild MSVC: Detect VS 2017 and VS Build Tools 2017 2017-04-10 19:35:06 +02:00
.clang-format clang-format files touched in d01a91f7 [nfc] 2017-05-24 21:35:40 +01:00
.clang-tidy clang-tidy: Add readability-else-after-return 2015-11-02 11:30:40 +02:00
.editorconfig Add a .editorconfig file for dfmt. The settings are the same as DMD's. [NFC] 2016-03-04 20:24:25 +01:00
.gitattributes
.gitmodules Revert submodule 2017-08-27 17:43:00 +03:00
.travis.yml Raise min LLVM version to 3.9 (#2872) 2018-10-15 22:31:59 +02:00
appveyor.yml Merge pull request #2850 from kinke/llvm7 2018-09-29 00:03:48 +02:00
CHANGELOG.md Update changelog (#2861) 2018-09-29 17:24:30 +02:00
CMakeCPack.cmake
CMakeLists.txt Raise min LLVM version to 3.9 (#2872) 2018-10-15 22:31:59 +02:00
Doxyfile
ldc2.conf.in Config file: Adapt wasm section to lib-dirs (#2841) 2018-09-02 12:37:59 +02:00
ldc2_install.conf.in Config file: Adapt wasm section to lib-dirs (#2841) 2018-09-02 12:37:59 +02:00
ldc2_phobos.conf.in Config file: Adapt wasm section to lib-dirs (#2841) 2018-09-02 12:37:59 +02:00
LICENSE Renamings 2017-11-10 22:00:03 +03:00
README.md README.md: Reduce duplication (#2834) 2018-08-28 20:49:37 +02:00
shippable.yml Upgrade LLVM to v7.0.0 2018-09-26 17:21:35 +02:00

LDC the LLVM-based D Compiler

Build Status Build Status Build Status Build Status Bountysource

The LDC project provides a portable D programming language compiler with modern optimization and code generation capabilities.

The compiler uses the official DMD frontend to support the latest version of D2, and relies on the LLVM Core libraries for code generation.

LDC is fully Open Source; the parts of the source code not taken/adapted from other projects are BSD-licensed (see the LICENSE file for details).

Please consult the D wiki for further information: https://wiki.dlang.org/LDC

D1 is no longer available; see the d1 Git branch for the last version supporting it.

Installation

From a pre-built package

Portable stand-alone binary builds for common platforms (incl. Linux, macOS and Windows) are available at the GitHub release page.

For bleeding-edge users, we also provide the latest successful Continuous Integration builds with enabled LLVM & LDC assertions (increasing compile times by roughly 50%).

The dlang.org install script can also be used to install LDC:

curl -fsS https://dlang.org/install.sh | bash -s ldc

In addition, LDC is available from various package managers:

Command
Android in Termux app: pkg install ldc
Arch Linux pacman -S ldc
Debian apt install ldc
Fedora dnf install ldc
Gentoo layman -a ldc
Homebrew brew install ldc
Ubuntu apt install ldc
Snap snap install --classic --channel=edge ldc2
Nix/NixOS nix-env -i ldc
Chocolatey choco ldc
Docker docker pull dlanguage/ldc

Note that these packages might be outdated as they are not currently integrated into the project release process.

Notes on Windows

LDC for Windows relies on the Microsoft linker and runtime libraries, which can be obtained by either installing Visual Studio 2015 or 2017 with Visual C++, or the stand-alone Visual C++ Build Tools.

Targeting Android

You can find full instructions on cross-compiling or natively compiling for Android on the wiki.

Building from source

In-depth material on building and installing LDC and the standard libraries is available on the project wiki for Linux, macOS, BSD, and Android and Windows.

If you have a working C++/D build environment, CMake, and a current LLVM version (≥ 3.7) available, there should be no big surprises. Do not forget to make sure all the submodules (druntime, phobos, dmd-testsuite) are up to date:

$ cd ldc
$ git submodule update --init

(DMD and LDC are supported as host compilers. For bootstrapping purposes, LDC 0.17, the last version not to require a D compiler, is maintained in the ltsmaster branch).

Cross-compiling

We've recently added a cross-compilation tool to make it easier to build the D runtime and standard library for other platforms, ldc-build-runtime. Full instructions and example invocations are provided on its wiki page.

Contact

The best way to get in touch with the developers is either via the digitalmars.D.ldc forum/newsgroup/mailing list or our Gitter chat. There is also the #ldc IRC channel on FreeNode.

For further documentation, contributor information, etc. please see the D wiki.

Feedback of any kind is very much appreciated!