Skip to content
The LLVM-based D Compiler.
D C++ CMake Shell C Makefile
Branch: master
Clone or download

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.azure-pipelines CI: Adapt to lit v0.10 Apr 11, 2020
.circleci CI: Adapt to new ubuntu:rolling image (focal) (#3412) Apr 26, 2020
cmake/Modules Add -output-mlir and prepare for MLIR emission (#3313) May 22, 2020
dmd Merge upstream stable (dlang/dmd@2f5f529) (#3452) May 30, 2020
docs some docs Sep 6, 2018
driver Remove bitrig support (#3445) May 28, 2020
gen Merge pull request #3441 from kinke/fix_captured_nonpassed May 29, 2020
ir Emulate @weak functions on Windows and don't emit COMDATs for ELF any… May 16, 2020
packaging Bump bundled dub to v1.21.0 final (#3433) May 15, 2020
res Upgrade front-end & libs to v2.086.0-beta.1 Apr 23, 2019
runtime Merge upstream stable (dlang/dmd@2f5f529) (#3452) May 30, 2020
tests Merge upstream stable (dlang/dmd@2f5f529) (#3452) May 30, 2020
tools Finalize support for LLVM 10 (#3323) Feb 14, 2020
utils gccbuiltins: Lift 256-bit vector limit, adding 174 builtins for x86 w… Apr 15, 2020
.cirrus.yml CI: Adapt to new ubuntu:rolling image (focal) (#3412) Apr 26, 2020
.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 CI: Adapt to lit v0.10 Apr 11, 2020
CHANGELOG.md Prepare changelog for v1.21.0 (#3409) Apr 23, 2020
CMakeCPack.cmake Add CPack configuration for debian packages Feb 12, 2014
CMakeLists.txt CMake: Bump LDC version to v1.22.0 May 17, 2020
Doxyfile Inlined sources in Doxygen docs (for tablet use) and increased DOT ma… Feb 20, 2015
LICENSE Update LLVM license to Apache 2.0 (#3342) Mar 3, 2020
README.md README.md: Add FreeBSD install cmdline May 9, 2020
azure-pipelines.yml Adopt DMD's MSVC toolchain detection Apr 30, 2020
bitrise.yml Update to run iOS device testing on iPhone 6S 12.0 (#3450) May 30, 2020
ldc2.conf.in Config file: Use a separate section for multilib targets (#3276) Jan 12, 2020
ldc2_install.conf.in Config file: Use a separate section for multilib targets (#3276) Jan 12, 2020
ldc2_phobos.conf.in Config file: Use a separate section for multilib targets (#3276) Jan 12, 2020
shippable.yml Shippable CI: Disable the 3 gdb lit-tests too, like the other gdb tests May 3, 2020

README.md

LDC – the LLVM-based D Compiler

Latest stable release Build status 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
FreeBSD pkg 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 install ldc
Docker docker pull dlang2/ldc-ubuntu

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 recent 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, GDC and LDC are supported as host compilers. For bootstrapping purposes, we recommend GDC via its gdmd wrapper. Alternatively, LDC 0.17, the last version not to require a D compiler, is maintained to some degree in the ltsmaster branch.)

Cross-compiling

Similar to other LLVM-based compilers, cross-compiling with LDC is simple. Full instructions and example invocations are provided on the dedicated 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!

You can’t perform that action at this time.