Skip to content

Commit 625c151

Browse files
jbergstroembnoordhuis
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: #908 Refs: nodejs/node#6173 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Johan Bergström <[email protected]>
1 parent 3bcb172 commit 625c151

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: gyp/pylib/gyp/generator/make.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -2065,10 +2065,10 @@ def CalculateMakefilePath(build_file, base_name):
20652065
'AR.target': GetEnvironFallback(('AR_target', 'AR'), '$(AR)'),
20662066
'CXX.target': GetEnvironFallback(('CXX_target', 'CXX'), '$(CXX)'),
20672067
'LINK.target': GetEnvironFallback(('LINK_target', 'LINK'), '$(LINK)'),
2068-
'CC.host': GetEnvironFallback(('CC_host',), 'gcc'),
2069-
'AR.host': GetEnvironFallback(('AR_host',), 'ar'),
2070-
'CXX.host': GetEnvironFallback(('CXX_host',), 'g++'),
2071-
'LINK.host': GetEnvironFallback(('LINK_host',), '$(CXX.host)'),
2068+
'CC.host': GetEnvironFallback(('CC_host', 'CC'), 'gcc'),
2069+
'AR.host': GetEnvironFallback(('AR_host', 'AR'), 'ar'),
2070+
'CXX.host': GetEnvironFallback(('CXX_host', 'CXX'), 'g++'),
2071+
'LINK.host': GetEnvironFallback(('LINK_host', 'LINK'), '$(CXX.host)'),
20722072
})
20732073

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

0 commit comments

Comments
 (0)