The LLVM-based D Compiler.
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci CircleCI: Work around cmake.org being temporarily down (all day) Dec 15, 2018
.semaphoreci Semaphore: Add missing -DCMAKE_BUILD_TYPE=Release in CMake cmdline (#… Aug 9, 2018
cmake/Modules CMake: Add option COMPILE_D_MODULES_SEPARATELY Nov 17, 2018
dmd Resync gen/target.cpp with dmd/target.d Dec 12, 2018
docs some docs Sep 6, 2018
driver Android: don't use ld.gold by default yet. Dec 12, 2018
gen Fix issue #2937 (DI scope for types in static foreach in mixin templa… Dec 16, 2018
ir Replace old-school header guards by `#pragma once` Oct 20, 2018
packaging Upgrade bundled dub to v1.12.1 Dec 15, 2018
res Upgrade to D v2.079.0-beta.1 Feb 20, 2018
runtime Fix AArch64 dmd-style profile measurements. (#2950) Dec 23, 2018
tests Add internal_lld Lit-test feature. (#2952) Dec 22, 2018
tools Add LLVM 8 llvm-profdata and FileCheck. Nov 2, 2018
utils Add LLVM 8 llvm-profdata and FileCheck. Nov 2, 2018
vcbuild CMake: Some cleanup wrt. include/import dirs Oct 20, 2018
.clang-format clang-format files touched in d01a91f [nfc] May 24, 2017
.clang-tidy clang-tidy: Add readability-else-after-return Nov 2, 2015
.editorconfig Add a .editorconfig file for dfmt. The settings are the same as DMD's… Mar 4, 2016
.gitattributes set proper attributes for Windows Jul 1, 2014
.gitmodules Revert submodule Aug 27, 2017
.travis.yml Enable LLVM 7.0.1 test on Travis (#2955) Dec 23, 2018
CHANGELOG.md Add 1.12.0 details to changelog Dec 9, 2018
CMakeCPack.cmake Add CPack configuration for debian packages Feb 12, 2014
CMakeLists.txt Merge v2.083.1 Dec 8, 2018
Doxyfile Inlined sources in Doxygen docs (for tablet use) and increased DOT ma… Feb 20, 2015
LICENSE Renamings Nov 10, 2017
README.md Update README.md Nov 16, 2018
appveyor.yml CI: Upgrade LDC-LLVM to v7.0.1 Dec 15, 2018
ldc2.conf.in Config file: Adapt wasm section to lib-dirs (#2841) Sep 2, 2018
ldc2_install.conf.in Remove default `import/ldc` import dir (=> object.d in `import`) and … Oct 20, 2018
ldc2_phobos.conf.in Config file: Adapt wasm section to lib-dirs (#2841) Sep 2, 2018
shippable.yml CI: Upgrade LDC-LLVM to v7.0.1 Dec 15, 2018

README.md

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 (but note that these packages might be outdated as they are not currently integrated into the project release process):

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

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.9) 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!