Browse files

Fix StandardCompilers check

* Return true if Xcode version is not in hash, not nil
* Use two-digit version numbers for 4.0, 4.2, 4.3
  • Loading branch information...
1 parent 703d595 commit 802616b437315b5bd33a5646ccbe2a28067950a6 @mistydemeo mistydemeo committed Apr 11, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 Library/Homebrew/utils.rb
View
9 Library/Homebrew/utils.rb
@@ -525,18 +525,19 @@ def prefer_64_bit?
StandardCompilers = {
"3.1.4" => {:gcc_40_build_version=>5493, :gcc_42_build_version=>5577, :llvm_build_version=>2064},
"3.2.6" => {:gcc_40_build_version=>5494, :gcc_42_build_version=>5666, :llvm_build_version=>2335, :clang_version=>"1.7", :clang_build_version=>77},
- "4.0.0" => {:gcc_40_build_version=>5494, :gcc_42_build_version=>5666, :llvm_build_version=>2335, :clang_version=>"2.0", :clang_build_version=>137},
+ "4.0" => {:gcc_40_build_version=>5494, :gcc_42_build_version=>5666, :llvm_build_version=>2335, :clang_version=>"2.0", :clang_build_version=>137},
"4.0.1" => {:gcc_40_build_version=>5494, :gcc_42_build_version=>5666, :llvm_build_version=>2335, :clang_version=>"2.0", :clang_build_version=>137},
"4.0.2" => {:gcc_40_build_version=>5494, :gcc_42_build_version=>5666, :llvm_build_version=>2335, :clang_version=>"2.0", :clang_build_version=>137},
- "4.2.0" => {:llvm_build_version=>2336, :clang_version=>"3.0", :clang_build_version=>211},
- "4.3.0" => {:llvm_build_version=>2336, :clang_version=>"3.1", :clang_build_version=>318},
+ "4.2" => {:llvm_build_version=>2336, :clang_version=>"3.0", :clang_build_version=>211},
+ "4.3" => {:llvm_build_version=>2336, :clang_version=>"3.1", :clang_build_version=>318},
"4.3.1" => {:llvm_build_version=>2336, :clang_version=>"3.1", :clang_build_version=>318},
"4.3.2" => {:llvm_build_version=>2336, :clang_version=>"3.1", :clang_build_version=>318}
}
def compilers_standard?
xcode = MacOS.xcode_version
- return unless StandardCompilers.keys.include? xcode
+ # Assume compilers are okay if Xcode version not in hash
+ return true unless StandardCompilers.keys.include? xcode
StandardCompilers[xcode].all? {|k,v| MacOS.send(k) == v}
end

0 comments on commit 802616b

Please sign in to comment.