# Install llvm@22 with Homebrew, MacPorts, Nix, apk, zypper, chocolatey, apt, dnf, pacman, scoop, winget

Next-gen compiler infrastructure. Version 22.1.8 via Homebrew; verified 2026-09-11. Also installable with nix: nix profile install nixpkgs#llvm_22.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install llvm@22
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install llvm-22
```

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

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#llvm_22
```

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

- apk (92%):

```sh
sudo apk add llvm22
```

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

- zypper (92%):

```sh
sudo zypper install llvm22
```

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

- Debian apt (92%):

```sh
sudo apt install llvm
```

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

- dnf (92%):

```sh
sudo dnf install llvm
```

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

- pacman (92%):

```sh
sudo pacman -S llvm
```

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

### Windows

- Chocolatey (92%):

```sh
choco install llvm
```

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

- Scoop (92%):

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

  Evidence: 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
```

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

## Package facts

- **Package key:** brew:llvm@22
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/llvm@22>
- **Version:** 22.1.8
- **Source summary:** Next-gen compiler infrastructure
- **Homepage:** <https://llvm.org/>
- **Repository:** <https://github.com/llvm/llvm-project>
- **Upstream docs:** <https://llvm.org/>
- **License:** Apache-2.0 WITH LLVM-exception
- **Source archive:** <https://github.com/llvm/llvm-project/releases/download/llvmorg-22.1.8/llvm-project-22.1.8.src.tar.xz>
- **Last updated:** 2026-09-11T07:34:05Z
- **Generated:** 2026-09-19T06:45:57+00:00

## Dependencies

- zstd

## Build dependencies

- cmake
- ninja
- python@3.14

## Uses from macOS

- libedit
- libffi

## Install behavior

- Post-install hook: not defined
- Caveats: 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@22 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@22/lib/unwind -lunwind" To use the bundled libc++ please use the following LDFLAGS: LDFLAGS="-L$HOMEBREW_PREFIX/opt/llvm@22/lib/c++ -L$HOMEBREW_PREFIX/opt/llvm@22/lib/unwind -lunwind" Features newer than system libc++ will require the following define to enable: CPPFLAGS="-D_LIBCPP_DISABLE_AVAILABILITY" NOTE: You probably want to use the libunwind and libc++ provided by macOS unless you know what you're doing.
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-09-19
- Package-manager version: 22.1.8
- Package-manager updated: 2026-09-11
- Local data: ok
- Upstream repository: https://github.com/llvm/llvm-project
- info: No cached GitHub release or tag data was available.
## Project history and usage

LLVM 22 is a versioned distribution of the LLVM compiler and toolchain ecosystem. It packages LLVM libraries together with Clang, MLIR, binary utilities, analysis tools, language-server tooling, and numerous target-independent development utilities.

### Project history

LLVM began as a University of Illinois research project aimed at an SSA-based compilation strategy supporting both static and dynamic compilation. It evolved into a collection of reusable compiler and toolchain technologies rather than a traditional virtual machine.

The project expanded into an umbrella for LLVM Core, Clang, LLD, libc++, MLIR, and other subprojects. The formerly separate repositories were consolidated into the unified llvm-project Git repository, simplifying coordinated development and release management.

### Adoption history

LLVM grew from an academic compiler-research project into an umbrella project used by commercial products, open-source systems, and research projects. Clang's adoption as a production C-family compiler and LLVM's reusable optimizer and code-generation libraries established the ecosystem as a major alternative to traditional monolithic compiler suites.

Distribution packages and versioned formulas let developers install LLVM alongside system compilers without replacing them. The llvm@22 formula serves users who need the LLVM 22 toolchain generation after the unversioned formula advances.

### How it is used

Developers use the package to compile C and C++ with Clang, transform or inspect LLVM IR, generate machine code, analyze source, format code, provide clangd editor integration, inspect binaries, gather coverage, and build compiler-related projects.

Because Homebrew's LLVM is installed separately from Apple's system toolchain, builds commonly select it explicitly through PATH, CC/CXX, or CMake compiler settings. Individual llvm-* commands are also useful independently of Clang.

### Why package nerds care

LLVM is unusually rich package-manager territory: a single installation supplies compilers, optimizers, assemblers, binary utilities, debuggability tools, language servers, static-analysis tools, coverage tools, and MLIR utilities. Versioned packages matter because compiler behavior, supported targets, ABI expectations, and build-system compatibility can change between major releases.

LLVM also underpins many adjacent language runtimes and developer tools. Package maintainers routinely use its individual utilities as drop-in or cross-platform alternatives to GNU and platform-specific tools.

### Timeline

- 2000: LLVM began as a research project at the University of Illinois.
- 2003: LLVM's public project documentation and early releases established the reusable compiler-infrastructure project.
- 2019: LLVM subprojects were consolidated into the unified llvm-project Git repository.
- 2026: The llvm@22 formula preserves the LLVM 22 toolchain generation as an explicitly versioned installation.

### Related projects

- Clang is LLVM's C-family compiler frontend.
- LLD is the LLVM linker.
- MLIR supplies reusable multi-level intermediate-representation infrastructure.
- libc++ and compiler-rt provide runtime and standard-library components.
- GNU Compiler Collection and GNU Binutils are common alternative or complementary toolchains.

### Sources

- <https://github.com/llvm/llvm-project>
- <https://llvm.org/>
- <https://llvm.org/docs/>
- <https://llvm.org/docs/GettingStarted.html>


## Security Notes

No matching local secret-handling manifest was found for llvm@22. Package metadata is still published here so future coverage has a stable package URL.


## Source Database Details

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

## Other Package-Manager Records

- Nix - llvm_22: normalized package name match | nixpkgs package indexes: llvm_22 from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- MacPorts - llvm-22: normalized package name match | MacPorts ports tree: lang/llvm-22/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- apk - llvm22 - 22.1.8-r1: package manager index match | Alpine Linux edge package indexes: llvm22 from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Low Level Virtual Machine compiler system, version 22 | https://llvm.org/
- apk - llvm22-dev - 22.1.8-r1: package manager index match | Alpine Linux edge package indexes: llvm22-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Low Level Virtual Machine compiler system, version 22 (development files) | https://llvm.org/
- apk - llvm22-gtest - 22.1.8-r1: package manager index match | Alpine Linux edge package indexes: llvm22-gtest from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | LLVM 22 gtest static libraries | https://llvm.org/
- apk - llvm22-libs - 22.1.8-r1: package manager index match | Alpine Linux edge package indexes: llvm22-libs from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | LLVM 22 runtime library | https://llvm.org/
- apk - llvm22-linker-tools - 22.1.8-r1: package manager index match | Alpine Linux edge package indexes: llvm22-linker-tools from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Low Level Virtual Machine compiler system, version 22 (linker plugins) | https://llvm.org/
- apk - llvm22-static - 22.1.8-r1: package manager index match | Alpine Linux edge package indexes: llvm22-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | LLVM 22 static libraries | https://llvm.org/
- apk - llvm22-test-utils - 22.1.8-r1: package manager index match | Alpine Linux edge package indexes: llvm22-test-utils from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | LLVM 22 utilities for executing LLVM and Clang style test suites | https://llvm.org/
- apk - llvm22-test-utils-pyc - 22.1.8-r1: package manager index match | Alpine Linux edge package indexes: llvm22-test-utils-pyc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Precompiled Python bytecode for llvm22-test-utils | https://llvm.org/
- zypper - clang-tools - 22.1.8-2.1: package manager index match | openSUSE Tumbleweed package metadata: clang-tools from https://download.opensuse.org/tumbleweed/repo/oss/repodata/d310d5a96106e1e8872a385adf98aaa23be9db5d80937a6717314e7e7f37715065c6c748ab7ccee6475d620b46979c0fe64235fc0c46988e17edf659578fcf31-primary.xml.zst | Tools for Clang | https://clang-analyzer.llvm.org/
- zypper - clang22 - 22.1.8-2.1: package manager index match | openSUSE Tumbleweed package metadata: clang22 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/d310d5a96106e1e8872a385adf98aaa23be9db5d80937a6717314e7e7f37715065c6c748ab7ccee6475d620b46979c0fe64235fc0c46988e17edf659578fcf31-primary.xml.zst | CLANG frontend for LLVM | https://clang.llvm.org/
- zypper - clang22-devel - 22.1.8-2.1: package manager index match | openSUSE Tumbleweed package metadata: clang22-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/d310d5a96106e1e8872a385adf98aaa23be9db5d80937a6717314e7e7f37715065c6c748ab7ccee6475d620b46979c0fe64235fc0c46988e17edf659578fcf31-primary.xml.zst | CLANG frontend for LLVM (devel package) | https://www.llvm.org/
- zypper - clang22-doc - 22.1.8-2.1: package manager index match | openSUSE Tumbleweed package metadata: clang22-doc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/d310d5a96106e1e8872a385adf98aaa23be9db5d80937a6717314e7e7f37715065c6c748ab7ccee6475d620b46979c0fe64235fc0c46988e17edf659578fcf31-primary.xml.zst | Documentation for Clang | https://www.llvm.org/
- zypper - libLLVM22 - 22.1.8-2.1: package manager index match | openSUSE Tumbleweed package metadata: libLLVM22 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/d310d5a96106e1e8872a385adf98aaa23be9db5d80937a6717314e7e7f37715065c6c748ab7ccee6475d620b46979c0fe64235fc0c46988e17edf659578fcf31-primary.xml.zst | Libraries for LLVM | https://www.llvm.org/
- zypper - libLLVM22-32bit - 22.1.8-2.1: package manager index match | openSUSE Tumbleweed package metadata: libLLVM22-32bit from https://download.opensuse.org/tumbleweed/repo/oss/repodata/d310d5a96106e1e8872a385adf98aaa23be9db5d80937a6717314e7e7f37715065c6c748ab7ccee6475d620b46979c0fe64235fc0c46988e17edf659578fcf31-primary.xml.zst | Libraries for LLVM | https://www.llvm.org/


## Related links

- [Developer build packages](https://pkg.so/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://pkg.so/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://pkg.so/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Archive and compression packages](https://pkg.so/archive-compression-tools/) - Matched curated package taxonomy and local package facts.
- [zstd](https://pkg.so/brew/zstd/) - Runtime dependency declared by Homebrew.
- [python@3.14](https://pkg.so/brew/python-3-14/) - Build dependency declared by Homebrew.
- [cmake](https://pkg.so/brew/cmake/) - Build dependency declared by Homebrew.
- [ninja](https://pkg.so/brew/ninja/) - Build dependency declared by Homebrew.
- [rust](https://pkg.so/brew/rust/) - Popular package that depends on this formula.
- [openai-whisper](https://pkg.so/brew/openai-whisper/) - Popular package that depends on this formula.
- [apache-arrow](https://pkg.so/brew/apache-arrow/) - Popular package that depends on this formula.
- [crystal](https://pkg.so/brew/crystal/) - Popular package that depends on this formula.
- [odin](https://pkg.so/brew/odin/) - Popular package that depends on this formula.
- [faust](https://pkg.so/brew/faust/) - Popular package that depends on this formula.
- [c3c](https://pkg.so/brew/c3c/) - Popular package that depends on this formula.
- [backgroundremover](https://pkg.so/brew/backgroundremover/) - Popular package that depends on this formula.
- [llvm](https://pkg.so/brew/llvm/) - Package name indicates the same formula family.
- [llvm@20](https://pkg.so/brew/llvm-20/) - Package name indicates the same formula family.
- [llvm@21](https://pkg.so/brew/llvm-21/) - Package name indicates the same formula family.
- [llvm@18](https://pkg.so/brew/llvm-18/) - Package name indicates the same formula family.
- [llvm@16](https://pkg.so/brew/llvm-16/) - Package name indicates the same formula family.
- [llvm@19](https://pkg.so/brew/llvm-19/) - Package name indicates the same formula family.
- [llvm@15](https://pkg.so/brew/llvm-15/) - Package name indicates the same formula family.
- [lld](https://pkg.so/brew/lld/) - Shares the same upstream source repository.

## Combined YAML source

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


## Sources

- pkg.so package database
- package-page enrichment
- curated package history
- package version freshness
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
