Fix llvm_build_version to handle xcode_prefix output.

This commit is contained in:
Adam Vandenberg 2011-04-26 13:43:41 -07:00
parent cfdca92630
commit 3ad0e634a3

View File

@ -273,7 +273,7 @@ module MacOS extend self
def llvm_build_version def llvm_build_version
unless xcode_prefix.to_s.empty? unless xcode_prefix.to_s.empty?
llvm_gcc_path = xcode_prefix/"usr/bin/llvm-gcc" llvm_gcc_path = xcode_prefix.to_s + "usr/bin/llvm-gcc"
# for Xcode 3 on OS X 10.5 this will not exist # for Xcode 3 on OS X 10.5 this will not exist
if llvm_gcc_path.file? if llvm_gcc_path.file?
`#{llvm_gcc_path} -v 2>&1` =~ /LLVM build (\d{4,})/ `#{llvm_gcc_path} -v 2>&1` =~ /LLVM build (\d{4,})/