aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorShaun Jackman2014-06-01 08:58:24 -0700
committerJack Nagel2014-06-03 09:43:27 -0500
commitbd682d551989e05e492280b400274b942824b3ba (patch)
tree7e53be7c17b8d31d787142377ccff8626ee19d0c /Library
parent6e560092176ee7ec99e71590245e9dd77ce9a83b (diff)
downloadbrew-bd682d551989e05e492280b400274b942824b3ba.tar.bz2
Treat HOMEBREW_CC the same as --cc
Closes Homebrew/homebrew#29762. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/ENV/shared.rb4
1 files changed, 1 insertions, 3 deletions
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