Don't look for llvm-gcc in xcode_prefix
Look in /usr/bin because all versions of Xcode install it to /usr/bin now and this allows us to support Xcode-less installs of Apple's developer tools.
This commit is contained in:
parent
eb52b97a1e
commit
0f3f0626d3
@ -325,13 +325,11 @@ module MacOS extend self
|
|||||||
end
|
end
|
||||||
|
|
||||||
def llvm_build_version
|
def llvm_build_version
|
||||||
unless xcode_prefix.to_s.empty?
|
# for Xcode 3 on OS X 10.5 this will not exist
|
||||||
llvm_gcc_path = xcode_prefix/"usr/bin/llvm-gcc"
|
# NOTE may not be true anymore but we can't test
|
||||||
# for Xcode 3 on OS X 10.5 this will not exist
|
if File.exist? "/usr/bin/llvm-gcc"
|
||||||
if llvm_gcc_path.file?
|
`/usr/bin/llvm-gcc -v 2>&1` =~ /LLVM build (\d{4,})/
|
||||||
`#{llvm_gcc_path} -v 2>&1` =~ /LLVM build (\d{4,})/
|
$1.to_i
|
||||||
$1.to_i # if nil this raises and then you fix the regex
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user