From 2dbc6b977f092e0b5b3b72a4064b6e4a22358eb6 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Wed, 16 Jun 2010 13:32:09 -0700 Subject: Use same LLVM binary to check build # as we do to build with. Different llvm binaries were used to check build numbers and to compile with. Normalize this, and normalize the variable name used to hold the xcode location. (Calling it "prefix" is confusing, since there are already concepts in Homebrew called "prefx".) --- Library/Homebrew/brew.h.rb | 2 +- Library/Homebrew/extend/ENV.rb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/brew.h.rb b/Library/Homebrew/brew.h.rb index 3c82bf25a..bd4153b16 100644 --- a/Library/Homebrew/brew.h.rb +++ b/Library/Homebrew/brew.h.rb @@ -560,7 +560,7 @@ def llvm_build if MACOS_VERSION >= 10.6 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,})/ + `#{xcode_path}/usr/bin/llvm-gcc -v 2>&1` =~ /LLVM build (\d{4,})/ $1.to_i end end diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb index c0b6318a2..9ce298b05 100644 --- a/Library/Homebrew/extend/ENV.rb +++ b/Library/Homebrew/extend/ENV.rb @@ -20,11 +20,11 @@ module HomebrewEnvExtension if MACOS_VERSION >= 10.6 and (ENV['HOMEBREW_USE_LLVM'] or ARGV.include? '--use-llvm') # you can install Xcode wherever you like you know. - prefix = `/usr/bin/xcode-select -print-path`.chomp - prefix = "/Developer" if prefix.to_s.empty? + xcode_path = `/usr/bin/xcode-select -print-path`.chomp + xcode_path = "/Developer" if xcode_prefix.to_s.empty? - ENV['CC'] = "#{prefix}/usr/bin/llvm-gcc" - ENV['CXX'] = "#{prefix}/usr/bin/llvm-g++" + ENV['CC'] = "#{xcode_path}/usr/bin/llvm-gcc" + ENV['CXX'] = "#{xcode_path}/usr/bin/llvm-g++" cflags = %w{-O4} # link time optimisation baby! else # if we don't set these, many formula fail to build -- cgit v1.2.3