aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2011-09-01 14:32:38 +0100
committerMax Howell2011-09-01 14:33:54 +0100
commitecbd8abac2d52799683cccb24b2efd521044a52a (patch)
tree57a2233eeae0160bf25efeb79d28e49dc9b78cc6 /Library
parent278c11fc9f24de552c1cda49a4c97f8ab51b886d (diff)
downloadhomebrew-ecbd8abac2d52799683cccb24b2efd521044a52a.tar.bz2
Use GCC if we tested against the latest LLVM
Latest is hardcoded, so we'll have to update as new Xcode's come along.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index ca7885983..6e3d78e63 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -322,6 +322,14 @@ class Formula
def handle_llvm_failure llvm
case ENV.compiler
when :llvm, :clang
+ # version 2335 is the latest version as of Xcode 4.1, so it is the
+ # latest version we have tested against so we will switch to GCC and
+ # bump this integer when Xcode 4.2 is released. TODO do that!
+ if llvm.build.to_i >= 2335
+ opoo "Formula will not build with LLVM, using GCC"
+ ENV.gcc
+ return
+ end
opoo "Building with LLVM, but this formula is reported to not work with LLVM:"
puts
puts llvm.reason
@@ -334,9 +342,6 @@ class Formula
puts
puts "If it doesn't work you can: brew install --use-gcc"
puts
- else
- ENV.gcc if MacOS.default_cc =~ /llvm/
- return
end
end