tools: fix GYP ninja generator for Python 3
PR-URL: https://github.com/nodejs/node/pull/29416 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
parent
17d87d522c
commit
af161f0efb
@ -355,7 +355,7 @@ class NinjaWriter(object):
|
||||
|
||||
Uses a stamp file if necessary."""
|
||||
|
||||
assert targets == filter(None, targets), targets
|
||||
assert targets == [item for item in targets if item], targets
|
||||
if len(targets) == 0:
|
||||
assert not order_only
|
||||
return None
|
||||
@ -432,8 +432,8 @@ class NinjaWriter(object):
|
||||
compile_depends.append(target.PreCompileInput())
|
||||
if target.uses_cpp:
|
||||
self.target.uses_cpp = True
|
||||
actions_depends = filter(None, actions_depends)
|
||||
compile_depends = filter(None, compile_depends)
|
||||
actions_depends = [item for item in actions_depends if item]
|
||||
compile_depends = [item for item in compile_depends if item]
|
||||
actions_depends = self.WriteCollapsedDependencies('actions_depends',
|
||||
actions_depends)
|
||||
compile_depends = self.WriteCollapsedDependencies('compile_depends',
|
||||
@ -2381,6 +2381,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
|
||||
|
||||
qualified_target_for_hash = gyp.common.QualifiedTarget(build_file, name,
|
||||
toolset)
|
||||
qualified_target_for_hash = qualified_target_for_hash.encode('utf-8')
|
||||
hash_for_rules = hashlib.md5(qualified_target_for_hash).hexdigest()
|
||||
|
||||
base_path = os.path.dirname(build_file)
|
||||
|
Loading…
x
Reference in New Issue
Block a user