# 使用 Homebrew, apt, dnf, Nix, pacman, zypper 安装 lld

查看 lld 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:lld
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install lld
```

  证据: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install lld
```

  证据: Debian stable package indexes: lld from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install lld
```

  证据: Fedora Rawhide package metadata: lld from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#lld
```

  证据: nixpkgs package indexes: lld from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S lld
```

  证据: Arch Linux sync databases: lld from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install lld
```

  证据: openSUSE Tumbleweed package metadata: lld from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:lld
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/lld>
- **版本:** 22.1.8
- **来源摘要:** LLVM Project Linker
- **主页:** <https://lld.llvm.org/>
- **仓库:** <https://github.com/llvm/llvm-project>
- **上游文档:** <https://lld.llvm.org/>
- **许可证:** Apache-2.0 WITH LLVM-exception
- **源码归档:** <https://github.com/llvm/llvm-project/releases/download/llvmorg-22.1.8/llvm-project-22.1.8.src.tar.xz>
- **最后更新:** 2026-06-21T01:50:33Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- ld.lld (cli)
- ld64.lld (cli)
- lld (cli)
- lld-link (cli)
- wasm-ld (cli)
- ld.lld (别名)
- ld64.lld (别名)
- lld (别名)
- lld-link (别名)
- wasm-ld (别名)

## 依赖

- llvm
- zstd

## 构建依赖

- cmake

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 22.1.8
- 管理器更新时间: 2026-06-21
- 本地数据: OK
- 上游仓库: https://github.com/llvm/llvm-project
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

lld is the LLVM Project's linker. It packages the LLVM approach to modular compiler infrastructure into the final link step, offering fast drop-in linkers for ELF, COFF, Mach-O, and WebAssembly workflows.

### 项目历史

lld developed as part of the broader LLVM toolchain. The official documentation describes it as a drop-in replacement for system linkers that runs much faster than traditional linkers and is useful for toolchain developers.

The lld documentation emphasizes several design choices that matter to compiler users: GNU-compatible command-line behavior for ELF, cross-linking support for all built targets, embeddability through lld::lldMain, default LTO support with clang, and a smaller codebase than GNU gold in the 2017 comparison.

The LLVM monorepo model means lld is released with LLVM rather than as a fully separate upstream project. Homebrew's lld formula builds the lld subproject from llvm-project release tarballs while depending on the matching LLVM package.

### 采用历史

lld adoption followed clang and LLVM adoption: developers could select it through compiler-driver flags such as -fuse-ld=lld instead of replacing /usr/bin/ld directly.

It became especially attractive for large C/C++ builds, cross-compilation, WebAssembly, Windows COFF/PDB workflows, and LTO-heavy builds where linker speed and LLVM integration matter.

### 使用方式

The package installs linkers such as ld.lld, ld64.lld, lld-link, and wasm-ld. Unix users often reach it through clang's -fuse-ld=lld option, while Windows-style builds use lld-link and WebAssembly builds use wasm-ld.

For package-manager users, installing lld separately from a full compiler bundle can make it easier to test linker behavior, speed up builds, or build toolchains that intentionally mix compiler and linker components.

### 为什么软件包爱好者会关心

lld is a core systems package because a linker affects every compiled binary produced through a toolchain. Small packaging choices around version matching, bottle compatibility, and dependency edges can ripple into large build farms.

Homebrew packaging lld as its own formula, rather than only as part of llvm, reflects the Unix tradition of swapping toolchain components one piece at a time.

### 时间线

- 2017: lld documentation compared lld/ELF with GNU gold and emphasized link-time performance and code-size differences.
- 2024: LLVM 19.1.0 release notes were published for the LLVM 19 release line.
- 2026: Homebrew formula metadata recorded lld built from llvm-project 22.1.8 release sources.

### Related projects

- lld is part of llvm-project alongside LLVM, Clang, compiler-rt, libc++, MLIR, and other toolchain subprojects.
- It is related to GNU ld, GNU gold, mold, platform linkers such as Apple's ld64, and WebAssembly toolchains that use wasm-ld.

### 来源

- <https://api.github.com/repos/llvm/llvm-project>
- <https://formulae.brew.sh/formula/lld>
- <https://github.com/llvm/llvm-project>
- <https://lld.llvm.org/>
- <https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/l/lld.rb>
- <https://releases.llvm.org/19.1.0/docs/ReleaseNotes.html>


## 安全说明

没有找到 lld 的匹配本地密钥处理 manifest。软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。


## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** lld
- **Aliases:** lld@22
- **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

## 其他软件包管理器记录

- Debian apt - lld - 1:19.0-63: normalized package name match | Debian stable package indexes: lld from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | LLVM-based linker
- Nix - lld: normalized package name match | nixpkgs package indexes: lld from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - lld - 1:18.0-59~exp2: normalized package name match | Ubuntu 24.04 LTS package indexes: lld from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | LLVM-based linker
- dnf - lld - 22.1.8-20.fc45: normalized package name match | Fedora Rawhide package metadata: lld from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | The LLVM Linker | http://llvm.org
- pacman - lld - 22.1.8-1: normalized package name match | Arch Linux sync databases: lld from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Linker from the LLVM project | https://lld.llvm.org/
- zypper - lld - 22-3.2: normalized package name match | openSUSE Tumbleweed package metadata: lld from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Linker for Clang/LLVM | https://lld.llvm.org/


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://pkg.so/zh-hans/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [zstd](https://pkg.so/zh-hans/brew/zstd/) - Runtime dependency declared by Homebrew.
- [llvm](https://pkg.so/zh-hans/brew/llvm/) - Runtime dependency declared by Homebrew.
- [cmake](https://pkg.so/zh-hans/brew/cmake/) - Build dependency declared by Homebrew.
- [odin](https://pkg.so/zh-hans/brew/odin/) - Popular package that depends on this formula.
- [c3c](https://pkg.so/zh-hans/brew/c3c/) - Popular package that depends on this formula.
- [afl++](https://pkg.so/zh-hans/brew/afl/) - Popular package that depends on this formula.
- [wasmedge](https://pkg.so/zh-hans/brew/wasmedge/) - Popular package that depends on this formula.
- [rust-wasm](https://pkg.so/zh-hans/brew/rust-wasm/) - Popular package that depends on this formula.
- [llvm@20](https://pkg.so/zh-hans/brew/llvm-20/) - Shares the same upstream source repository.
- [llvm@21](https://pkg.so/zh-hans/brew/llvm-21/) - Shares the same upstream source repository.
- [spirv-llvm-translator](https://pkg.so/zh-hans/brew/spirv-llvm-translator/) - Shares pkgdb curated category or tags: cli, compiler-toolchain, developer-tools, llvm.
- [mold](https://pkg.so/zh-hans/brew/mold/) - Shares pkgdb curated category or tags: cli, compiler-toolchain, developer-tools, linker.
- [bold](https://pkg.so/zh-hans/brew/bold/) - Shares pkgdb curated category or tags: cli, developer-tools, linker.
- [spirv-tools](https://pkg.so/zh-hans/brew/spirv-tools/) - Shares pkgdb curated category or tags: cli, compiler-toolchain, developer-tools.
- [qbe](https://pkg.so/zh-hans/brew/qbe/) - Shares pkgdb curated category or tags: cli, compiler-toolchain, developer-tools.
- [binutils](https://pkg.so/zh-hans/brew/binutils/) - Shares pkgdb curated category or tags: cli, developer-tools, linker.

## Combined YAML source

View the package source record on GitHub. [combined/lld.yml](https://github.com/mxcl/pkgdb/blob/main/combined/lld.yml)


## 来源

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