Restore previous fails_with_llvm? behaviour

I've not been very careful lately, I apologise.

Fixes Homebrew/homebrew#7338.
This commit is contained in:
Max Howell 2011-09-01 09:39:54 +01:00
parent 9520b6cc3c
commit abc8c2f9d7

View File

@ -226,10 +226,10 @@ class Formula
def fails_with_llvm? def fails_with_llvm?
llvm = self.class.fails_with_llvm_reason llvm = self.class.fails_with_llvm_reason
if llvm if llvm
if llvm.build if llvm.build and MacOS.llvm_build_version > llvm.build.to_i
MacOS.llvm_build_version <= llvm.build.to_i false
else else
true llvm
end end
end end
end end
@ -317,12 +317,17 @@ class Formula
def handle_llvm_failure llvm def handle_llvm_failure llvm
case ENV.compiler case ENV.compiler
when :llvm, :clang when :llvm, :clang
opoo "LLVM was requested, but this formula is reported to not work with LLVM:" opoo "Building with LLVM, but this formula is reported to not work with LLVM:"
puts puts
puts llvm.reason puts llvm.reason
puts puts
puts "We are continuing anyway so if the build succeeds, please let us know so we" puts <<-EOS.undent
puts "can update the formula. If it doesn't work you can: brew install --use-gcc" We are continuing anyway so if the build succeeds, please open a ticket with
the following information: #{MacOS.llvm_build_version}-#{MACOS_VERSION}. So
that we can update the formula accordingly. Thanks!
EOS
puts
puts "If it doesn't work you can: brew install --use-gcc"
puts puts
else else
ENV.gcc if MacOS.default_cc =~ /llvm/ ENV.gcc if MacOS.default_cc =~ /llvm/