diff options
| author | Max Howell | 2011-08-31 16:59:04 +0100 |
|---|---|---|
| committer | Max Howell | 2011-08-31 17:36:41 +0100 |
| commit | 1ee4139485e4e264a14c66f4295dc771d8f62b91 (patch) | |
| tree | 0dfd0f192ae2375ebcbefcf34382774aac76480c /Library/Homebrew/utils.rb | |
| parent | 2aa13c7997095e04b9c39c4325588c4c16fbb3d4 (diff) | |
| download | homebrew-1ee4139485e4e264a14c66f4295dc771d8f62b91.tar.bz2 | |
Default to LLVM for Xcodes that default to LLVM
Diffstat (limited to 'Library/Homebrew/utils.rb')
| -rw-r--r-- | Library/Homebrew/utils.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 08e6c5264..2a5a3a178 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -246,6 +246,14 @@ module MacOS extend self Pathname.new("/usr/bin/cc").realpath.basename.to_s end + def default_compiler + case default_cc + when /^gcc/ then :gcc + when /^llvm/ then :llvm + when "clang" then :clang + end + end + def gcc_42_build_version `/usr/bin/gcc-4.2 -v 2>&1` =~ /build (\d{4,})/ if $1 |
