From d71e1d07863f3fcfb6e24a425c7ab07e54bad88d Mon Sep 17 00:00:00 2001 From: Max Howell Date: Thu, 1 Sep 2011 14:32:38 +0100 Subject: [PATCH] Use GCC if we tested against the latest LLVM Latest is hardcoded, so we'll have to update as new Xcode's come along. --- Library/Homebrew/formula.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index ca7885983f..6e3d78e63a 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