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
commitd71e1d07863f3fcfb6e24a425c7ab07e54bad88d (patch)
treee4380ac376134a71ed8fcf8777c51d9f704651e6 /Library
parentd5e3c40ca1a2bf4eedab1bf8645f758668d228f5 (diff)
downloadbrew-d71e1d07863f3fcfb6e24a425c7ab07e54bad88d.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