CocoaEngineering
FORMULAv23.1.6

llvm for macOS

Next-gen compiler infrastructure

Installation on macOS (Apple Silicon & Intel)

brew install llvm

Package Metadata

Identifierllvm
Current Version23.1.6
Tap Repositoryhomebrew/core
LicenseApache-2.0 WITH LLVM-exception
Upstream Homepagehttps://llvm.org/
Last Verified2026-11-26T14:43:31Z

Runtime Dependencies (2)

zstd z3

Build Dependencies (3)

cmake ninja python@3.15

Engineering Caveats

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.
Browse macOS Packages A–Z