Treat HOMEBREW_CC the same as --cc
Closes Homebrew/homebrew#29762. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
6e56009217
commit
bd682d5519
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user