# 使用 Homebrew, MacPorts, Nix, apk, dnf, pacman, zypper, chocolatey, apt, scoop, winget 安装 llvm@20

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

## 安装

```sh
sudo av install brew:llvm@20
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install llvm@20
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install llvm-20
```

  证据: MacPorts ports tree: lang/llvm-20/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#llvm_20
```

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

- apk (92%):

```sh
sudo apk add llvm20
```

  证据: Alpine Linux edge package indexes: llvm20 from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install llvm20
```

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

- pacman (92%):

```sh
sudo pacman -S llvm20
```

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

- zypper (92%):

```sh
sudo zypper install llvm20
```

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

- Debian apt (92%):

```sh
sudo apt install llvm
```

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

### Windows

- Chocolatey (92%):

```sh
choco install llvm
```

  证据: Chocolatey community package catalog: llvm from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','lftp'

- Scoop (92%):

```sh
scoop install main/llvm
```

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

- winget (92%):

```sh
winget install --id LLVM.LLVM -e
```

  证据: Windows Package Manager source index: LLVM.LLVM from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:llvm@20
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/llvm@20>
- **版本:** 20.1.8
- **来源摘要:** Next-gen compiler infrastructure
- **主页:** <https://llvm.org/>
- **仓库:** <https://github.com/llvm/llvm-project>
- **上游文档:** <https://llvm.org/>
- **许可证:** Apache-2.0 WITH LLVM-exception
- **源码归档:** <https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.8/llvm-project-20.1.8.src.tar.xz>
- **最后更新:** 2026-08-01T07:56:10+01:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 依赖

- zstd

## 构建依赖

- cmake
- ninja
- python@3.14

## macOS 提供的库

- libedit
- libffi

## 安装行为

- post-install 钩子: 未定义
- 注意事项: CLANG_CONFIG_FILE_SYSTEM_DIR: $HOMEBREW_PREFIX/etc/clang CLANG_CONFIG_FILE_USER_DIR: ~/.config/clang LLD is now provided in a separate formula: brew install lld@20 Using `clang`, `clang++`, etc., requires a CLT installation at `/Library/Developer/CommandLineTools`. If you don't want to install the CLT, you can write appropriate configuration files pointing to your SDK at ~/.config/clang. To use the bundled libunwind please use the following LDFLAGS: LDFLAGS="-L$HOMEBREW_PREFIX/opt/llvm@20/lib/unwind -lunwind" To use the bundled libc++ please use the following LDFLAGS: LDFLAGS="-L$HOMEBREW_PREFIX/opt/llvm@20/lib/c++ -L$HOMEBREW_PREFIX/opt/llvm@20/lib/unwind -lunwind" NOTE: You probably want to use the libunwind and libc++ provided by macOS unless you know what you're doing.
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

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

LLVM 20 is the Homebrew versioned formula for the LLVM 20.x compiler infrastructure series, bundling Clang, LLVM command-line tools, LLD, MLIR utilities, and related developer tooling.

### 项目历史

LLVM began as a University of Illinois research project to provide a modern SSA-based compilation strategy for static and dynamic compilation. The project made its 1.0 release in October 2003 and later grew into an umbrella for compiler, debugger, runtime, linker, and analysis subprojects.

The upstream project describes LLVM as a collection of modular and reusable compiler and toolchain technologies rather than a single compiler. Its core libraries provide optimizer and code-generation infrastructure around LLVM IR, while Clang, LLD, LLDB, libc++, compiler-rt, MLIR, OpenMP, and other subprojects build on that base.

### 采用历史

LLVM moved from academic compiler infrastructure into mainstream production use across commercial, open source, and research projects. The project highlights external users spanning language implementations, JITs, static analysis tools, linkers, debuggers, and high-performance computing toolchains.

For package managers, LLVM's release train and large set of CLI tools made it a common versioned dependency. Versioned formulae such as llvm@20 let users pin a major compiler stack while newer major releases continue to land.

### 使用方式

Package users install LLVM for Clang and clang++, clang-format, clang-tidy, clangd, LLD, llvm-ar, llvm-objdump, llvm-config, opt, llc, FileCheck, MLIR tools, and many other compiler-development utilities. Upstream getting-started documentation centers on cloning llvm-project, configuring with CMake, and selecting enabled subprojects such as clang and lld.

Clang is documented as a C, C++, and Objective-C compiler driver that handles preprocessing, parsing, optimization, code generation, assembly, and linking, while transparently invoking lower-level compiler and linker tools.

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

LLVM is one of the canonical package-manager stress tests: huge source trees, many binaries, CMake builds, multiple runtime libraries, and a steady major-version cadence. Versioned formulae matter because downstream projects often need a specific Clang/LLVM ABI or tool behavior.

LLVM 20 is a major pinned compiler stack for users who want post-LLVM-19 features without taking the latest upstream major. In packaging terms, it is useful for CI images, language runtimes, and source builds that must align LLVM libraries, clang tools, and llvm-config.

### 时间线

- 2000: LLVM starts as a University of Illinois research project.
- 2003-10-24: LLVM 1.0 is released.
- 2012: LLVM receives the ACM Software System Award.
- 2025-03-04: LLVM 20.1.0 is released.
- 2025: Homebrew exposes LLVM 20 through the versioned llvm@20 formula.

### Related projects

- Clang, LLD, LLDB, libc++, compiler-rt, MLIR, OpenMP, Flang, BOLT, and the monorepo at github.com/llvm/llvm-project are the main related upstream projects.

### 来源

- <https://clang.llvm.org/docs/CommandGuide/clang.html>
- <https://llvm.org/>
- <https://llvm.org/docs/GettingStarted.html>
- <https://llvm.org/docs/GitHub.html>
- <https://llvm.org/pubs/2010-06-06-Clang-LLVM.pdf>
- <https://releases.llvm.org/>
- source_facts.package-manager-url


## 安全说明

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


## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** llvm@20
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** yes
- **URL Keys:** stable

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

- Nix - llvm_20: normalized package name match | nixpkgs package indexes: llvm_20 from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- MacPorts - llvm-20: normalized package name match | MacPorts ports tree: lang/llvm-20/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- apk - llvm20 - 20.1.8-r1: package manager index match | Alpine Linux edge package indexes: llvm20 from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Low Level Virtual Machine compiler system, version 20 | https://llvm.org/
- apk - llvm20-dev - 20.1.8-r1: package manager index match | Alpine Linux edge package indexes: llvm20-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Low Level Virtual Machine compiler system, version 20 (development files) | https://llvm.org/
- apk - llvm20-gtest - 20.1.8-r1: package manager index match | Alpine Linux edge package indexes: llvm20-gtest from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | LLVM 20 gtest static libraries | https://llvm.org/
- apk - llvm20-libs - 20.1.8-r1: package manager index match | Alpine Linux edge package indexes: llvm20-libs from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | LLVM 20 runtime library | https://llvm.org/
- apk - llvm20-linker-tools - 20.1.8-r1: package manager index match | Alpine Linux edge package indexes: llvm20-linker-tools from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Low Level Virtual Machine compiler system, version 20 (linker plugins) | https://llvm.org/
- apk - llvm20-static - 20.1.8-r1: package manager index match | Alpine Linux edge package indexes: llvm20-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | LLVM 20 static libraries | https://llvm.org/
- apk - llvm20-test-utils - 20.1.8-r1: package manager index match | Alpine Linux edge package indexes: llvm20-test-utils from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | LLVM 20 utilities for executing LLVM and Clang style test suites | https://llvm.org/
- apk - llvm20-test-utils-pyc - 20.1.8-r1: package manager index match | Alpine Linux edge package indexes: llvm20-test-utils-pyc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Precompiled Python bytecode for llvm20-test-utils | https://llvm.org/
- dnf - clang20 - 20.1.8-9.fc45: package manager index match | Fedora Rawhide package metadata: clang20 from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | A C language family front-end for LLVM | http://llvm.org
- dnf - clang20-analyzer - 20.1.8-9.fc45: package manager index match | Fedora Rawhide package metadata: clang20-analyzer from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | A source code analysis framework | http://llvm.org
- dnf - clang20-devel - 20.1.8-9.fc45: package manager index match | Fedora Rawhide package metadata: clang20-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Development header files for clang | http://llvm.org
- dnf - clang20-libs - 20.1.8-9.fc45: package manager index match | Fedora Rawhide package metadata: clang20-libs from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Runtime library for clang | http://llvm.org
- dnf - clang20-resource-filesystem - 20.1.8-9.fc45: package manager index match | Fedora Rawhide package metadata: clang20-resource-filesystem from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Filesystem package that owns the clang resource directory | http://llvm.org
- dnf - clang20-tools-extra - 20.1.8-9.fc45: package manager index match | Fedora Rawhide package metadata: clang20-tools-extra from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Extra tools for clang | http://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.
- [python@3.14](https://pkg.so/zh-hans/brew/python-3-14/) - Build dependency declared by Homebrew.
- [cmake](https://pkg.so/zh-hans/brew/cmake/) - Build dependency declared by Homebrew.
- [ninja](https://pkg.so/zh-hans/brew/ninja/) - Build dependency declared by Homebrew.
- [llvm](https://pkg.so/zh-hans/brew/llvm/) - Package name indicates the same formula family.
- [llvm@21](https://pkg.so/zh-hans/brew/llvm-21/) - Package name indicates the same formula family.
- [llvm@18](https://pkg.so/zh-hans/brew/llvm-18/) - Package name indicates the same formula family.
- [llvm@19](https://pkg.so/zh-hans/brew/llvm-19/) - Package name indicates the same formula family.
- [llvm@16](https://pkg.so/zh-hans/brew/llvm-16/) - Package name indicates the same formula family.
- [llvm@15](https://pkg.so/zh-hans/brew/llvm-15/) - Package name indicates the same formula family.
- [llvm@14](https://pkg.so/zh-hans/brew/llvm-14/) - Package name indicates the same formula family.
- [lld](https://pkg.so/zh-hans/brew/lld/) - Shares the same upstream source repository.

## Combined YAML source

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


## 来源

- pkg.so package database
- 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
