aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
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