Do not assume /Developer when checking LLVM. Fixes Homebrew/homebrew#1160.

This commit is contained in:
Adam Vandenberg 2010-04-15 13:07:59 -07:00
parent f144dcab60
commit 9295f9c022

View File

@ -544,7 +544,9 @@ end
def llvm_build
if MACOS_VERSION >= 10.6
`/Developer/usr/bin/llvm-gcc-4.2 -v 2>&1` =~ /LLVM build (\d{4,})/
xcode_path = `/usr/bin/xcode-select -print-path`.chomp
return nil if xcode_path.empty?
`#{xcode_path}/usr/bin/llvm-gcc-4.2 -v 2>&1` =~ /LLVM build (\d{4,})/
$1.to_i
end
end