If LLVM isn't installed then fails_with_llvm? is true

This makes sense, I assure you. Fixes Homebrew/homebrew#7458.
This commit is contained in:
Max Howell 2011-09-06 17:51:14 +01:00
parent 5dc302604f
commit d37918b20f
2 changed files with 2 additions and 2 deletions

View File

@ -231,7 +231,7 @@ class Formula
def fails_with_llvm?
llvm = self.class.fails_with_llvm_reason
if llvm
if llvm.build and MacOS.llvm_build_version > llvm.build.to_i
if llvm.build and MacOS.llvm_build_version.to_i > llvm.build.to_i
false
else
llvm

View File

@ -329,7 +329,7 @@ module MacOS extend self
def llvm_build_version
# for Xcode 3 on OS X 10.5 this will not exist
# NOTE may not be true anymore but we can't test
if File.exist? "/usr/bin/llvm-gcc"
@llvm_build_version ||= if File.exist? "/usr/bin/llvm-gcc"
`/usr/bin/llvm-gcc -v 2>&1` =~ /LLVM build (\d{4,})/
$1.to_i
end