aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2013-07-20 22:40:22 -0500
committerJack Nagel2013-07-20 22:40:22 -0500
commite23a3492f44b616fc72d270519e2f0ae7cd782f0 (patch)
tree48acb8012cc78c8d58f59752400de4837d361d8e
parent8e0158b4d74b3724d31cd284ce362b07f5678d9f (diff)
downloadbrew-e23a3492f44b616fc72d270519e2f0ae7cd782f0.tar.bz2
Don't report llvm-gcc if it's actually clang
-rw-r--r--Library/Homebrew/macos.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/macos.rb b/Library/Homebrew/macos.rb
index c56919949..e884000dd 100644
--- a/Library/Homebrew/macos.rb
+++ b/Library/Homebrew/macos.rb
@@ -126,10 +126,10 @@ 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
- @llvm_build_version ||= if locate("llvm-gcc")
- `#{locate("llvm-gcc")} --version` =~ /LLVM build (\d{4,})/
- $1.to_i
- end
+ @llvm_build_version ||=
+ if (path = locate("llvm-gcc")) && path.realpath.basename.to_s !~ /^clang/
+ %x{#{path} --version}[/LLVM build (\d{4,})/, 1].to_i
+ end
end
def clang_version