From a680b66fc44c2ad517a34503a17f4c3cdeb5ed98 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Thu, 15 Apr 2010 13:07:59 -0700 Subject: Do not assume /Developer when checking LLVM. Fixes #1160. --- Library/Homebrew/brew.h.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Homebrew/brew.h.rb b/Library/Homebrew/brew.h.rb index 0c9017760..b05ce2ed2 100644 --- a/Library/Homebrew/brew.h.rb +++ b/Library/Homebrew/brew.h.rb @@ -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 -- cgit v1.2.3