Skip to content

Commit 742d4f9

Browse files
jbergstroemrefack
authored andcommitted
gyp: inherit CC/CXX for CC/CXX.host
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 <[email protected]> Reviewed-By: Johan Bergström <[email protected]>
1 parent 07e0d94 commit 742d4f9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

gyp/pylib/gyp/generator/make.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -2074,10 +2074,10 @@ def CalculateMakefilePath(build_file, base_name):
20742074
'AR.target': GetEnvironFallback(('AR_target', 'AR'), '$(AR)'),
20752075
'CXX.target': GetEnvironFallback(('CXX_target', 'CXX'), '$(CXX)'),
20762076
'LINK.target': GetEnvironFallback(('LINK_target', 'LINK'), '$(LINK)'),
2077-
'CC.host': GetEnvironFallback(('CC_host',), 'gcc'),
2078-
'AR.host': GetEnvironFallback(('AR_host',), 'ar'),
2079-
'CXX.host': GetEnvironFallback(('CXX_host',), 'g++'),
2080-
'LINK.host': GetEnvironFallback(('LINK_host',), '$(CXX.host)'),
2077+
'CC.host': GetEnvironFallback(('CC_host', 'CC'), 'gcc'),
2078+
'AR.host': GetEnvironFallback(('AR_host', 'AR'), 'ar'),
2079+
'CXX.host': GetEnvironFallback(('CXX_host', 'CXX'), 'g++'),
2080+
'LINK.host': GetEnvironFallback(('LINK_host', 'LINK'), '$(CXX.host)'),
20812081
})
20822082

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

0 commit comments

Comments
 (0)