I just followed the official documentation :) But setting LLVM_CONFIG was not documented

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11

xcode-select --install

brew install llvm@14

echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.zshrc_profile

export LDFLAGS="-L/opt/homebrew/opt/llvm@14/lib"
export CPPFLAGS="-I/opt/homebrew/opt/llvm@14/include"

export LLVM_CONFIG="/opt/homebrew/opt/llvm@14/bin/llvm-config