aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMisty De Meo2013-10-16 17:53:01 -0700
committerMisty De Meo2013-10-19 23:17:05 -0700
commitdbeb9c2a272fa2a49529dd2186c53f3c982915c9 (patch)
tree035af92b3cd906afee1d66fcce6f6d4b1b8db0e5 /Library
parente6ff2aaefc41a68e0809e3d80b3fb5986a714620 (diff)
downloadhomebrew-dbeb9c2a272fa2a49529dd2186c53f3c982915c9.tar.bz2
superenv: always respect HOMEBREW_CC
Closes #23322.
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/ENV/4.3/cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc
index bef8b8c41..e385ec3d5 100755
--- a/Library/ENV/4.3/cc
+++ b/Library/ENV/4.3/cc
@@ -56,13 +56,7 @@ class Cmd
@tool ||= case @arg0
when 'ld' then 'ld'
when 'cpp' then 'cpp'
- when 'cc', 'c99', 'c89'
- # Ideally we would run `cx9`, however these tools are POSIX compliant
- # and don't support many flags. We need -isystem for instance, but also
- # reliability is generally much higher if we just get clang/gcc to do
- # the work since Makefiles are dumb and include a lot of excess flags.
- ENV['HOMEBREW_CC']
- when 'c++'
+ when /\w\+\+$/
case ENV['HOMEBREW_CC']
when /clang/
'clang++'
@@ -72,7 +66,9 @@ class Cmd
'g++' + $1.to_s
end
else
- @arg0
+ # Note that this is a universal fallback, so that we'll always invoke
+ # HOMEBREW_CC regardless of what name under which the tool was invoked.
+ ENV['HOMEBREW_CC']
end
end
def args