llvm@21
brew install llvm@21
v21.1.8
Apache-2.0 WITH LLVM-exception
keg-only
LLVM 21.x compiler infrastructure toolkit: C/C++ frontend, optimization passes, code generators, and toolchain components.
Why you might care
Use LLVM@21 when you need a specific versioned toolchain for projects requiring cutting-edge optimizations, custom backends, or compatibility with LLVM 21's API. It's keg-only to coexist with other LLVM versions. Primary use: build dependency for clang-based projects, language runtimes, and JIT compilers that target LLVM IR.
3.6k
30-day installs · #740
31.0k
90-day · #388
61.9k
365-day · #573
Runtime dependencies
Build dependencies
Links
- https://llvm.org/
- Brew formula source: Formula/l/llvm@21.rb
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@21 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@21/lib/unwind -lunwind" To use the bundled libc++ please use the following LDFLAGS: LDFLAGS="-L$HOMEBREW_PREFIX/opt/llvm@21/lib/c++ -L$HOMEBREW_PREFIX/opt/llvm@21/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.
Keg-only reason
:versioned_formula
Blurb generated by claude-haiku-4-5 on today.
Raw metadata
{
"aliases": [],
"alternatives": [
"GCC",
"Clang",
"LLVM@20",
"LLVM@19"
],
"build_dependencies": [
"cmake",
"ninja",
"python@3.14"
],
"categories": [
"compiler",
"language-runtime",
"build-system",
"library"
],
"caveats": "CLANG_CONFIG_FILE_SYSTEM_DIR: $HOMEBREW_PREFIX/etc/clang\nCLANG_CONFIG_FILE_USER_DIR: ~/.config/clang\n\nLLD is now provided in a separate formula:\n brew install lld@21\n\nUsing `clang`, `clang++`, etc., requires a CLT installation at `/Library/Developer/CommandLineTools`.\nIf you don\u0027t want to install the CLT, you can write appropriate configuration files pointing to your\nSDK at ~/.config/clang.\n\nTo use the bundled libunwind please use the following LDFLAGS:\n LDFLAGS=\"-L$HOMEBREW_PREFIX/opt/llvm@21/lib/unwind -lunwind\"\n\nTo use the bundled libc++ please use the following LDFLAGS:\n LDFLAGS=\"-L$HOMEBREW_PREFIX/opt/llvm@21/lib/c++ -L$HOMEBREW_PREFIX/opt/llvm@21/lib/unwind -lunwind\"\nFeatures newer than system libc++ will require the following define to enable:\n CPPFLAGS=\"-D_LIBCPP_DISABLE_AVAILABILITY\"\n\nNOTE: You probably want to use the libunwind and libc++ provided by macOS unless you know what you\u0027re doing.\n",
"conflicts_with": [],
"dependencies": [
"zstd"
],
"deprecated": 0,
"deprecation_reason": null,
"desc": "Next-gen compiler infrastructure",
"disable_reason": null,
"disabled": 0,
"enrichment_fetched_at": "2026-06-20T23:41:03+00:00",
"first_seen": "2026-06-20T23:34:18+00:00",
"full_name": "llvm@21",
"github_default_branch": null,
"github_last_commit_at": null,
"github_readme_excerpt": null,
"github_repo": null,
"github_stars": null,
"github_topics": [],
"homepage": "https://llvm.org/",
"homepage_og_description": null,
"homepage_og_image": null,
"homepage_title": "The LLVM Compiler Infrastructure Project",
"installs_30d": 3601,
"installs_365d": 61906,
"installs_90d": 30978,
"keg_only": 1,
"keg_only_reason": ":versioned_formula",
"last_seen": "2026-06-20T23:34:18+00:00",
"license": "Apache-2.0 WITH LLVM-exception",
"llm_generated_at": "2026-06-20T23:46:45+00:00",
"llm_model": "claude-haiku-4-5",
"name": "llvm@21",
"oldnames": [],
"one_liner": "LLVM 21.x compiler infrastructure toolkit: C/C++ frontend, optimization passes, code generators, and toolchain components.",
"optional_dependencies": [],
"rank_30d": 740,
"rank_365d": 573,
"rank_90d": 388,
"raw_hash": "08ee7dc72df91e42",
"recommended_dependencies": [],
"revision": 0,
"ruby_source_path": "Formula/l/llvm@21.rb",
"tap": "homebrew/core",
"test_dependencies": [
"python@3.14"
],
"uses_from_macos": [
"libedit",
"libffi"
],
"version_head": null,
"version_stable": "21.1.8",
"versioned_formulae": [
"llvm@20",
"llvm@19",
"llvm@18",
"llvm@17",
"llvm@16",
"llvm@15",
"llvm@14",
"llvm@12"
],
"why_use_this": "Use LLVM@21 when you need a specific versioned toolchain for projects requiring cutting-edge optimizations, custom backends, or compatibility with LLVM 21\u0027s API. It\u0027s keg-only to coexist with other LLVM versions. Primary use: build dependency for clang-based projects, language runtimes, and JIT compilers that target LLVM IR."
}