Skip to content

Commit 7eb3679

Browse files
jbergstroemMylesBorins
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: #6173 Fixes: #6152 Reviewed-By: João Reis <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 5fb252a commit 7eb3679

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
@@ -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)