From bd682d551989e05e492280b400274b942824b3ba Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Sun, 1 Jun 2014 08:58:24 -0700 Subject: Treat HOMEBREW_CC the same as --cc Closes Homebrew/homebrew#29762. Signed-off-by: Jack Nagel --- Library/Homebrew/extend/ENV/shared.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/extend/ENV/shared.rb b/Library/Homebrew/extend/ENV/shared.rb index 5d29a14ae..1c64c7dd2 100644 --- a/Library/Homebrew/extend/ENV/shared.rb +++ b/Library/Homebrew/extend/ENV/shared.rb @@ -94,7 +94,7 @@ module SharedEnvExtension def fcflags; self['FCFLAGS']; end def compiler - @compiler ||= if (cc = ARGV.cc) + @compiler ||= if (cc = [ARGV.cc, homebrew_cc].compact.first) COMPILER_SYMBOL_MAP.fetch(cc) do |other| case other when GNU_GCC_REGEXP @@ -103,8 +103,6 @@ module SharedEnvExtension raise "Invalid value for --cc: #{other}" end end - elsif homebrew_cc - COMPILER_SYMBOL_MAP.fetch(homebrew_cc) { MacOS.default_compiler } else MacOS.default_compiler end -- cgit v1.2.3