Configure homebrew to compile with specific clang version

Viewed 805

I need to use the llvm.org version of clang, rather than the Apple version of clang, as the compiler for a specific Homebrew formula. I installed llvm37 with

brew tap homebrew/versions
brew install llvm37

so I have clang-3.7 at /usr/local/bin. But HOMEBREW_CC can't be set to this path:

HOMEBREW_CC=clang-3.7 HOMEBREW_CXX=clang++-3.7 brew install --build-from-source <formula>
Error: Invalid value for HOMEBREW_CC: clang-3.7

What are some alternative ways to try forcing Homebrew to use this version of clang in its build environment?

0 Answers
Related