From e23a3492f44b616fc72d270519e2f0ae7cd782f0 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sat, 20 Jul 2013 22:40:22 -0500 Subject: Don't report llvm-gcc if it's actually clang --- Library/Homebrew/macos.rb | 8 ++++---- 1 file 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 -- cgit v1.2.3