Skip to content

Commit c0141d8

Browse files
jbergstroembnoordhuis
authored andcommitted
gyp: inherit parent for *.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++). Also apply the same logic for link/ar for consistency although it doesn't affect us. PR-URL: nodejs#6173 Fixes: nodejs#6152 Reviewed-By: João Reis <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
1 parent c2f1525 commit c0141d8

File tree

1 file changed

+4
-4
lines changed
  • tools/gyp/pylib/gyp/generator

1 file changed

+4
-4
lines changed

tools/gyp/pylib/gyp/generator/make.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -2063,10 +2063,10 @@ def CalculateMakefilePath(build_file, base_name):
20632063
'AR.target': GetEnvironFallback(('AR_target', 'AR'), '$(AR)'),
20642064
'CXX.target': GetEnvironFallback(('CXX_target', 'CXX'), '$(CXX)'),
20652065
'LINK.target': GetEnvironFallback(('LINK_target', 'LINK'), '$(LINK)'),
2066-
'CC.host': GetEnvironFallback(('CC_host',), 'gcc'),
2067-
'AR.host': GetEnvironFallback(('AR_host',), 'ar'),
2068-
'CXX.host': GetEnvironFallback(('CXX_host',), 'g++'),
2069-
'LINK.host': GetEnvironFallback(('LINK_host',), '$(CXX.host)'),
2066+
'CC.host': GetEnvironFallback(('CC_host', 'CC'), 'gcc'),
2067+
'AR.host': GetEnvironFallback(('AR_host', 'AR'), 'ar'),
2068+
'CXX.host': GetEnvironFallback(('CXX_host', 'CXX'), 'g++'),
2069+
'LINK.host': GetEnvironFallback(('LINK_host', 'LINK'), '$(CXX.host)'),
20702070
})
20712071

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

0 commit comments

Comments
 (0)