# Install ldc with Homebrew, apk, chocolatey, apt, dnf, MacPorts, Nix, pacman, scoop, zypper

Portable D programming language compiler. Version 1.42.0 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:ldc
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install ldc
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install ldc
```

  Evidence: MacPorts ports tree: lang/ldc/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add ldc
```

  Evidence: Alpine Linux edge package indexes: ldc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install ldc
```

  Evidence: Debian stable package indexes: ldc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install ldc
```

  Evidence: Fedora Rawhide package metadata: ldc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#ldc
```

  Evidence: nixpkgs package indexes: pkgs/by-name/ld/ldc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S ldc
```

  Evidence: Arch Linux sync databases: ldc from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install ldc
```

  Evidence: openSUSE Tumbleweed package metadata: ldc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install ldc
```

  Evidence: Chocolatey community package catalog: ldc from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='8.884','vim-x64'

- Scoop (92%):

```sh
scoop install main/ldc
```

  Evidence: Scoop official bucket manifest trees: bucket/ldc.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:ldc
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/ldc>
- **Version:** 1.42.0
- **Source summary:** Portable D programming language compiler
- **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>
- **Generated:** 2026-07-09T07:20:21+00:00

## Executables

- ldc-build-plugin (cli)
- ldc-build-runtime (cli)
- ldc-profdata (cli)
- ldc-profgen (cli)
- ldc-prune-cache (cli)
- ldc2 (cli)
- ldmd2 (cli)
- timetrace2txt (cli)
- ldc-build-plugin (alias)
- ldc-build-runtime (alias)
- ldc-profdata (alias)
- ldc-profgen (alias)
- ldc-prune-cache (alias)
- ldc2 (alias)
- ldmd2 (alias)
- timetrace2txt (alias)

## Dependencies

- llvm@21

## Build dependencies

- cmake
- pkgconf

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-09
- Package-manager version: 1.42.0
- Local data: ok
- Upstream repository: https://github.com/ldc-developers/ldc
- info: No package-manager update timestamp was available.
- info: No cached GitHub release or tag data was available.
## Project history and usage

LDC is the LLVM-backed compiler for the D programming language, pairing the D frontend and runtime libraries with LLVM code generation and optimization.

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

- 2000s: LDC begins as an LLVM-based compiler path for the D language.
- 2016: The 1.0 release line establishes LDC as a stable D compiler package.
- 2023: LDC 1.33.0 documents semantic-analysis plugin support and adds ldc-build-plugin.
- 2024: LDC 1.38.0 documents LLVM 18 support and Android TLS/runtime changes.
- 2025: LDC 1.41.0 documents LLVM 20 support and Ubuntu 22.04-based Linux packages.
- 2026-03-01: LDC 1.42.0 documents LLVM 21 support and D frontend/druntime/Phobos version 2.112.1+.

### Related projects

- Related projects include DMD, the reference D compiler whose frontend LDC tracks; GDC, the GCC-based D compiler; LLVM and Clang; and the D runtime and Phobos standard library.

### Sources

- <https://formulae.brew.sh/formula/ldc>
- <https://github.com/ldc-developers/ldc>
- <https://github.com/ldc-developers/ldc/releases>
- <https://raw.githubusercontent.com/ldc-developers/ldc/master/CHANGELOG.md>
- <https://wiki.dlang.org/LDC>


## Security Notes

generalized runtime or code generation signal.

- **Geiger risk:** yellow / medium
- generalized runtime or code generation signal

## Source Database Details

- **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:** head, stable

## Other Package-Manager Records

- Debian apt - ldc - 1:1.40.0-5: normalized package name match | Debian stable package indexes: ldc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | LLVM D Compiler | https://github.com/ldc-developers/ldc
- Debian apt - libphobos2-ldc-shared-dev - 1:1.40.0-5: normalized package name match | Debian stable package indexes: libphobos2-ldc-shared-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | LLVM D Compiler - Standard and runtime libraries, imports | https://github.com/ldc-developers/ldc
- Debian apt - libphobos2-ldc-shared110 - 1:1.40.0-5: normalized package name match | Debian stable package indexes: libphobos2-ldc-shared110 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | LLVM D Compiler - Standard and runtime libraries | https://github.com/ldc-developers/ldc
- Nix - ldc: normalized package name match | nixpkgs package indexes: pkgs/by-name/ld/ldc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - ldc - 1:1.36.0-2ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: ldc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | LLVM D Compiler | https://github.com/ldc-developers/ldc
- Ubuntu apt - libphobos2-ldc-shared-dev - 1:1.36.0-2ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libphobos2-ldc-shared-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | LLVM D Compiler - Standard and runtime libraries, imports | https://github.com/ldc-developers/ldc
- Ubuntu apt - libphobos2-ldc-shared106 - 1:1.36.0-2ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libphobos2-ldc-shared106 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | LLVM D Compiler - Standard and runtime libraries | https://github.com/ldc-developers/ldc
- apk - ldc - 1.42.0-r0: normalized package name match | Alpine Linux edge package indexes: ldc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | The LLVM-based D Compiler | https://github.com/ldc-developers/ldc
- apk - ldc-bash-completion - 1.42.0-r0: normalized package name match | Alpine Linux edge package indexes: ldc-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for ldc | https://github.com/ldc-developers/ldc
- apk - ldc-dbg - 1.42.0-r0: normalized package name match | Alpine Linux edge package indexes: ldc-dbg from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | The LLVM-based D Compiler (debug symbols) | https://github.com/ldc-developers/ldc
- apk - ldc-runtime - 1.42.0-r0: normalized package name match | Alpine Linux edge package indexes: ldc-runtime from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Dynamic runtime library for D code compiled with ldc-1.42.0 | https://github.com/ldc-developers/ldc
- apk - ldc-static - 1.42.0-r0: normalized package name match | Alpine Linux edge package indexes: ldc-static from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | The LLVM-based D Compiler (static library) | https://github.com/ldc-developers/ldc
- dnf - ldc - 1.42.0-2.fc45: normalized package name match | Fedora Rawhide package metadata: ldc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | LLVM D Compiler | https://github.com/ldc-developers/ldc
- dnf - ldc-libs - 1.42.0-2.fc45: normalized package name match | Fedora Rawhide package metadata: ldc-libs from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | LLVM D Compiler libraries | https://github.com/ldc-developers/ldc
- pacman - ldc - 3:1.42.0-1: normalized package name match | Arch Linux sync databases: ldc from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A D Compiler based on the LLVM Compiler Infrastructure including D runtime and libphobos2 | https://github.com/ldc-developers/ldc
- zypper - ldc - 1.40.1-1.3: normalized package name match | openSUSE Tumbleweed package metadata: ldc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | The LLVM D Compiler | https://wiki.dlang.org/LDC


## Related links

- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [llvm@21](https://www.automicvault.com/pkg/brew/llvm-21/) - Runtime dependency declared by Homebrew.
- [cmake](https://www.automicvault.com/pkg/brew/cmake/) - Build dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [dmd](https://www.automicvault.com/pkg/brew/dmd/) - Shares av.db curated category or tags: cli, compiler, d-language, language-runtime.
- [flang](https://www.automicvault.com/pkg/brew/flang/) - Shares av.db curated category or tags: cli, compiler, language-runtime, llvm.
- [llgo](https://www.automicvault.com/pkg/brew/llgo/) - Shares av.db curated category or tags: cli, compiler, language-runtime, llvm.
- [c3c](https://www.automicvault.com/pkg/brew/c3c/) - Shares av.db curated category or tags: cli, compiler, language-runtime.
- [cython](https://www.automicvault.com/pkg/brew/cython/) - Shares av.db curated category or tags: cli, compiler, language-runtime.
- [ghc](https://www.automicvault.com/pkg/brew/ghc/) - Shares av.db curated category or tags: cli, compiler, language-runtime.
- [halide](https://www.automicvault.com/pkg/brew/halide/) - Shares av.db curated category or tags: cli, compiler, language-runtime.
- [idris2](https://www.automicvault.com/pkg/brew/idris2/) - Shares av.db curated category or tags: cli, compiler, language-runtime.

## Combined YAML source

View the package source record on GitHub. [combined/ldc.yml](https://github.com/automic-vault/db/blob/main/combined/ldc.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
