diff options
| author | Jack Nagel | 2013-07-20 22:40:22 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-07-20 22:40:22 -0500 |
| commit | ec8b5f6f51d5e67bd0bffb505119649130d8d05a (patch) | |
| tree | 78002e58347eb837737d5158b273a70b23f4478e /Library | |
| parent | 58ae6d20bc6eefcba2454d4a2b46474dc921dd17 (diff) | |
| download | homebrew-ec8b5f6f51d5e67bd0bffb505119649130d8d05a.tar.bz2 | |
Don't report llvm-gcc if it's actually clang
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/macos.rb | 8 |
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 |
