Skip to content

Commit

Permalink
gyp: inherit CC/CXX for CC/CXX.host
Browse files Browse the repository at this point in the history
Gyp defaults to gcc/g++ if CC.host/CXX.host is unset. This is not
suitable for environments that only uses the clang toolchain.

Since we already assume that the user will provide clang/clang++
through CC/CXX, lean against it (then drop to gcc/g++).

PR-URL: nodejs#908
Refs: nodejs/node#6173
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
  • Loading branch information
jbergstroem authored and refack committed Aug 19, 2017
1 parent 07e0d94 commit 742d4f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gyp/pylib/gyp/generator/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -2074,10 +2074,10 @@ def CalculateMakefilePath(build_file, base_name):
'AR.target': GetEnvironFallback(('AR_target', 'AR'), '$(AR)'),
'CXX.target': GetEnvironFallback(('CXX_target', 'CXX'), '$(CXX)'),
'LINK.target': GetEnvironFallback(('LINK_target', 'LINK'), '$(LINK)'),
'CC.host': GetEnvironFallback(('CC_host',), 'gcc'),
'AR.host': GetEnvironFallback(('AR_host',), 'ar'),
'CXX.host': GetEnvironFallback(('CXX_host',), 'g++'),
'LINK.host': GetEnvironFallback(('LINK_host',), '$(CXX.host)'),
'CC.host': GetEnvironFallback(('CC_host', 'CC'), 'gcc'),
'AR.host': GetEnvironFallback(('AR_host', 'AR'), 'ar'),
'CXX.host': GetEnvironFallback(('CXX_host', 'CXX'), 'g++'),
'LINK.host': GetEnvironFallback(('LINK_host', 'LINK'), '$(CXX.host)'),
})

build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0])
Expand Down

0 comments on commit 742d4f9

Please sign in to comment.