macOS
brew install ldclocal Homebrew formula metadata
sudo port install ldcMacPorts ports tree · lang/ldc/Portfile · source: api.github.com
brew
Portable D programming language compiler. Version 1.42.0 via Homebrew; verified from local package data.
install
brew install ldclocal Homebrew formula metadata
sudo port install ldcMacPorts ports tree · lang/ldc/Portfile · source: api.github.com
sudo apk add ldcAlpine Linux edge package indexes · ldc · source: dl-cdn.alpinelinux.org
sudo apt install ldcDebian stable package indexes · ldc · source: deb.debian.org
sudo dnf install ldcFedora Rawhide package metadata · ldc · source: dl.fedoraproject.org
nix profile install nixpkgs#ldcnixpkgs package indexes · pkgs/by-name/ld/ldc/package.nix · source: api.github.com
sudo pacman -S ldcArch Linux sync databases · ldc · source: geo.mirror.pkgbuild.com
sudo zypper install ldcopenSUSE Tumbleweed package metadata · ldc · source: download.opensuse.org
choco install ldcChocolatey community package catalog · ldc · source: community.chocolatey.org
scoop install main/ldcScoop official bucket manifest trees · bucket/ldc.json · source: api.github.com
overview
Portable D programming language compiler
history
LDC is the LLVM-backed compiler for the D programming language, pairing the D frontend and runtime libraries with LLVM code generation and optimization.
LDC emerged to give D programmers an LLVM-based alternative to the reference DMD compiler and GCC's GDC. The project README describes the compiler as using the official DMD frontend and LLVM as backend, with the ldc2 command as the main compiler driver.
The project evolved from early experimental D compiler work into a regular release train maintained by the ldc-developers organization. Its changelog shows the ongoing maintenance burden that matters for compilers: tracking D frontend/druntime/Phobos versions, LLVM versions, target ABI changes, platform support, and prebuilt binary packaging.
By the 1.x series, LDC had become a practical production compiler for D, not just a backend experiment. Its release notes repeatedly call out supported LLVM ranges, bundled LLVM versions for prebuilt packages, cross-compilation work, and platform fixes across Linux, macOS, Windows, Android, Alpine/musl, RISC-V, PowerPC, and other targets.
LDC's adoption is tied to D users who want LLVM optimization, broader target support, link-time optimization, and packaging-friendly prebuilt compilers. Package-manager coverage across Homebrew, Debian, Ubuntu, Fedora-family systems, Alpine, Arch, Nix, Scoop, Chocolatey, MacPorts, and openSUSE-family systems reflects that it is one of the standard ways to install a D compiler.
The project also matters to downstream packagers because its behavior depends on matching D frontend/runtime versions to LLVM support windows. The changelog's repeated packaging notes, glibc baseline changes, installer changes, and bundled-runtime details are signals of a mature compiler package rather than a small standalone CLI.
Users invoke ldc2 to compile D programs, use ldmd2 for DMD-compatible command-line behavior, and rely on helper tools such as ldc-build-runtime, ldc-build-plugin, ldc-profdata, ldc-profgen, and timetrace2txt for runtime building, plugin workflows, profiling, and build-time analysis.
The compiler is commonly selected when D code needs LLVM optimization, cross-compilation targets, sanitizer or profiling support, or integration with LLVM-adjacent workflows.
LDC is package-nerd significant because compiler packages sit at the junction of language ecosystems and system toolchains. It has to coordinate D language releases, LLVM ABI/API changes, C toolchains, platform linkers, bundled runtime libraries, and distro-specific packaging constraints.
For Homebrew and other package managers, LDC is also a dependency-shaped package: installing it is not just about one executable, but about shipping a coherent compiler, runtime, standard library, config files, and helper tools.
security posture
generalized runtime or code generation signal.
yellow risk · medium confidence · runtime
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
ldc-build-plugin | cli | global executable | |
ldc-build-runtime | cli | global executable | |
ldc-profdata | cli | global executable | |
ldc-profgen | cli | global executable | |
ldc-prune-cache | cli | global executable | |
ldc2 | cli | global executable | |
ldmd2 | cli | global executable | |
timetrace2txt | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://github.com/ldc-developers/ldc
install metadata
| Package key | brew:ldc |
|---|---|
| Version | 1.42.0 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/ldc |
| Homepage | https://wiki.dlang.org/LDC |
| Repository | https://github.com/ldc-developers/ldc |
| Upstream docs | https://github.com/ldc-developers/ldc#readme |
| License | BSD-3-Clause |
| Source archive | https://github.com/ldc-developers/ldc/releases/download/v1.42.0/ldc-1.42.0-src.tar.gz |
| Dependencies | llvm@21 |
| Build dependencies | cmake, pkgconf |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | ldc |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
ldc 1:1.40.0-5
LLVM D Compiler
https://github.com/ldc-developers/ldc
sudo apt install ldclibphobos2-ldc-shared-dev 1:1.40.0-5
LLVM D Compiler - Standard and runtime libraries, imports
https://github.com/ldc-developers/ldc
sudo apt install libphobos2-ldc-shared-devlibphobos2-ldc-shared110 1:1.40.0-5
LLVM D Compiler - Standard and runtime libraries
https://github.com/ldc-developers/ldc
sudo apt install libphobos2-ldc-shared110ldc
nix profile install nixpkgs#ldcldc 1:1.36.0-2ubuntu2
LLVM D Compiler
https://github.com/ldc-developers/ldc
sudo apt install ldclibphobos2-ldc-shared-dev 1:1.36.0-2ubuntu2
LLVM D Compiler - Standard and runtime libraries, imports
https://github.com/ldc-developers/ldc
sudo apt install libphobos2-ldc-shared-devlibphobos2-ldc-shared106 1:1.36.0-2ubuntu2
LLVM D Compiler - Standard and runtime libraries
https://github.com/ldc-developers/ldc
sudo apt install libphobos2-ldc-shared106ldc 1.42.0-r0
The LLVM-based D Compiler
https://github.com/ldc-developers/ldc
sudo apk add ldcldc-bash-completion 1.42.0-r0
Bash completions for ldc
https://github.com/ldc-developers/ldc
sudo apk add ldc-bash-completionldc-dbg 1.42.0-r0
The LLVM-based D Compiler (debug symbols)
https://github.com/ldc-developers/ldc
sudo apk add ldc-dbgldc-runtime 1.42.0-r0
Dynamic runtime library for D code compiled with ldc-1.42.0
https://github.com/ldc-developers/ldc
sudo apk add ldc-runtimeldc-static 1.42.0-r0
The LLVM-based D Compiler (static library)
https://github.com/ldc-developers/ldc
sudo apk add ldc-staticldc 1.42.0-2.fc45
LLVM D Compiler
https://github.com/ldc-developers/ldc
sudo dnf install ldcldc-libs 1.42.0-2.fc45
LLVM D Compiler libraries
https://github.com/ldc-developers/ldc
sudo dnf install ldc-libsldc 3:1.42.0-1
A D Compiler based on the LLVM Compiler Infrastructure including D runtime and libphobos2
https://github.com/ldc-developers/ldc
sudo pacman -S ldcldc 1.40.1-1.3
The LLVM D Compiler
sudo zypper install ldcsource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.