llvm

Popular
Formula Development v23.1.2

Next-gen compiler infrastructure

When to use

Next-gen compiler infrastructure. Use llvm when you want a widely used development command-line package that can be installed and updated through Homebrew. It is one of FastBrew's top packages by Homebrew installs, with about 903.9K installs over the last year.

About

Install llvm on macOS with Homebrew Formula using `brew install llvm`. llvm is a Development command-line package with version 23.1.2. The package is listed in homebrew/core.

Install 1 App in Terminal
$
brew install llvm
Source: homebrew/core Website Homebrew

Dependencies

Build Dependencies

Installation Notes

CLANG_CONFIG_FILE_SYSTEM_DIR: $HOMEBREW_PREFIX/etc/clang
CLANG_CONFIG_FILE_USER_DIR:   ~/.config/clang

LLD and LLDB are now provided in separate formulae:
  brew install lld
  brew install lldb

Z3 solver support will be removed in LLVM 24 as it is unsupported upstream,
see https://github.com/llvm/llvm-project/pull/205370

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/lib/unwind -lunwind"

To use the bundled libc++ please use the following LDFLAGS:
  LDFLAGS="-L$HOMEBREW_PREFIX/opt/llvm/lib/c++ -L$HOMEBREW_PREFIX/opt/llvm/lib/unwind -lunwind"
Features newer than system libc++ will require the following define to enable
(support for this may be removed in a future major LLVM release):
  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.

Official Homebrew Stats

Install activity metrics for llvm.

-17.5% vs 90d avg
30 Days
52.0K total installs
1.7K installs / day avg
90 Days
189.0K total installs
2.1K installs / day avg
1 Year
903.9K total installs
2.5K installs / day avg

Frequently asked questions

How do I install llvm with Homebrew?

Run brew install llvm in Terminal to install llvm as a Homebrew formula on macOS.

What kind of package is llvm?

llvm is a Development Homebrew formula and FastBrew currently shows version 23.1.2.

What should I review before installing llvm?

Review the runtime dependencies (zstd, z3) and build dependencies (cmake, ninja, python@3.14) along with any caveats before installing.

Related Development Apps

View all

openssl@3

Popular

Cryptography and SSL/TLS Toolkit

ca-certificates

Popular

Mozilla CA certificate store

sqlite

Popular

Command-line interface for SQLite

node

Popular

Open-source, cross-platform JavaScript runtime environment

pcre2

Popular

Perl compatible regular expressions library with a new API

pkgconf

Popular

Package compiler and linker metadata toolkit