The LLVM-based D Compiler.
Find a file
2024-03-02 07:33:40 +00:00
.circleci CircleCI: Remove Mac jobs (#4469) 2023-08-17 01:42:53 +02:00
.github CI: Use -simulator suffix for x86_64 iOS triple (#4584) 2024-02-24 16:57:25 +01:00
cmake Fix LDC compilation with LDC 1.37 universal on macOS. Make ExtractDMDSystemLinker.cmake compatible with -target and -arch (#4431) 2024-03-01 14:05:10 +00:00
dmd Merge remote-tracking branch 'origin/dmd-rewrite-stable' into merge_2.107.1 2024-02-29 15:08:09 +01:00
docs some docs 2018-09-06 21:22:10 +03:00
driver Windows: Don't split CC into command + arguments separated by spaces (#4590) 2024-03-02 07:33:40 +00:00
gen Add support for -ffat-lto-objects. (#4549) 2024-03-01 21:19:00 +01:00
ir Handle new @standalone shared module constructors 2024-01-20 21:11:07 +01:00
packaging Bump bundled reggae to latest master 2024-03-02 02:50:55 +01:00
runtime Bump frontend patch version / dlang tools / Phobos submodule 2024-03-02 02:50:41 +01:00
tests Merge remote-tracking branch 'origin/dmd-rewrite-stable' into merge_2.107.1 2024-02-29 15:08:09 +01:00
tools update-dmd-rewrite: Include new druntime Makefile (generalized posix.mak) (#4545) 2023-12-19 04:38:15 +00:00
utils Add support for LLVM 17. (#4533) 2023-12-03 19:07:31 +01:00
.cirrus.yml Cirrus CI: Remove macOS jobs 2024-02-10 16:04:07 +01: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 Sync .editorconfig with dmd (#3449) 2020-06-13 18:49:24 +02:00
.gitattributes Migrate Linux-aarch64 CI from Travis to Cirrus CI 2023-02-11 01:54:47 +01:00
.gitmodules Remove druntime and dmd-testsuite submodules 2022-11-20 20:08:18 +01:00
bitrise.yml CI: Use LDC-LLVM v15.0.7 for prebuilt packages 2023-02-24 15:23:40 +01:00
CHANGELOG.md Bump frontend patch version / dlang tools / Phobos submodule 2024-03-02 02:50:41 +01:00
CMakeCPack.cmake
CMakeLists.txt Bump frontend patch version / dlang tools / Phobos submodule 2024-03-02 02:50:41 +01:00
Doxyfile Inlined sources in Doxygen docs (for tablet use) and increased DOT max. nodes to 1,000. 2015-02-20 14:57:44 +01:00
ldc2.conf.in Config file: Use a separate section for multilib targets (#3276) 2020-01-12 15:48:11 +01:00
ldc2_install.conf.in Config file: Use a separate section for multilib targets (#3276) 2020-01-12 15:48:11 +01:00
ldc2_phobos.conf.in Config file: Use a separate section for multilib targets (#3276) 2020-01-12 15:48:11 +01:00
LICENSE Update LLVM license to Apache 2.0 (#3342) 2020-03-04 00:03:58 +01:00
README.md README.md: Clean up orphaned badges 2024-02-05 19:31:13 +01:00

LDC the LLVM-based D Compiler

Latest release Latest stable release Build status Build status Build status Build status

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 (and a Windows installer) for common platforms (incl. Linux, macOS, Windows, FreeBSD and Android) are available at the GitHub release page. For Windows, the Visual D installer also comes with a bundled LDC.

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 these official packages from GitHub:

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

In addition, LDC is available from various package managers (but note that these packages are community-maintained, might be outdated and not offer the full feature set of official packages from GitHub):

Command
Alpine Linux apk add ldc
Android in Termux app: pkg install ldc
Arch Linux pacman -S ldc
Chocolatey choco install ldc
Debian apt install ldc
Docker docker pull dlang2/ldc-ubuntu
Fedora dnf install ldc
FreeBSD pkg install ldc
Gentoo layman -a ldc
Homebrew brew install ldc
Nix/NixOS nix-env -i ldc
OpenBSD pkg_add ldc
Snap snap install --classic --channel=edge ldc2
Ubuntu apt install ldc
Void xbps-install -S ldc

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 (≥ 11) available, there should be no big surprises. Do not forget to make sure the Phobos submodule is 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.)

Cross-compilation

Similar to other LLVM-based compilers, cross-compiling with LDC is simple. Full instructions and example invocations are provided on the dedicated Wiki page.

Targeting Android

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

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!