Skip to content

Brew LLVM

H. Joe Lee edited this page Oct 12, 2023 · 1 revision
To use the bundled libc++ please add the following LDFLAGS:
  LDFLAGS="-L/usr/local/opt/llvm/lib/c++ -Wl,-rpath,/usr/local/opt/llvm/lib/c++"

llvm is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have llvm first in your PATH, run:
  echo 'setenv PATH /usr/local/opt/llvm/bin:$PATH' >> ~/.tcshrc

For compilers to find llvm you may need to set:
  setenv LDFLAGS -L/usr/local/opt/llvm/lib;
  setenv CPPFLAGS -I/usr/local/opt/llvm/include;
Clone this wiki locally