Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Unified Diff: pylib/gyp/generator/ninja.py

Issue 1410213005: win: Fix missing loadable_module dependency in ULDI mode (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: all-generators Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/dependencies/gyptest-indirect-module-dependency.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/generator/ninja.py
diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py
index 0e8ae9790853ea7051dd0ace99c363c63e7cc361..58be3bf1d328691b9497f10cfe8cfdfa4f6d2406 100644
--- a/pylib/gyp/generator/ninja.py
+++ b/pylib/gyp/generator/ninja.py
@@ -139,8 +139,11 @@ class Target(object):
self.bundle = None
# On Windows, incremental linking requires linking against all the .objs
# that compose a .lib (rather than the .lib itself). That list is stored
- # here.
+ # here. In this case, we also need to save the compile_deps for the target,
+ # so that the the target that directly depends on the .objs can also depend
+ # on those.
self.component_objs = None
+ self.compile_deps = None
# Windows only. The import .lib is the output of a build step, but
# because dependents only link against the lib (not both the lib and the
# dll) we keep track of the import library here.
@@ -474,16 +477,17 @@ class NinjaWriter(object):
elif self.flavor == 'mac' and len(self.archs) > 1:
link_deps = collections.defaultdict(list)
-
+ compile_deps = self.target.actions_stamp or actions_depends
if self.flavor == 'win' and self.target.type == 'static_library':
self.target.component_objs = link_deps
+ self.target.compile_deps = compile_deps
# Write out a link step, if needed.
output = None
is_empty_bundle = not link_deps and not mac_bundle_depends
if link_deps or self.target.actions_stamp or actions_depends:
output = self.WriteTarget(spec, config_name, config, link_deps,
- self.target.actions_stamp or actions_depends)
+ compile_deps)
if self.is_mac_bundle:
mac_bundle_depends.append(output)
@@ -1093,6 +1097,7 @@ class NinjaWriter(object):
implicit_deps = set()
solibs = set()
+ order_deps = set()
if 'dependencies' in spec:
# Two kinds of dependencies:
@@ -1111,6 +1116,8 @@ class NinjaWriter(object):
target.component_objs and
self.msvs_settings.IsUseLibraryDependencyInputs(config_name)):
new_deps = target.component_objs
+ if target.compile_deps:
+ order_deps.add(target.compile_deps)
elif self.flavor == 'win' and target.import_lib:
new_deps = [target.import_lib]
elif target.UsesToc(self.flavor):
@@ -1249,6 +1256,7 @@ class NinjaWriter(object):
ninja_file.build(output, command + command_suffix, link_deps,
implicit=list(implicit_deps),
+ order_only=list(order_deps),
variables=extra_bindings)
return linked_binary
« no previous file with comments | « no previous file | test/dependencies/gyptest-indirect-module-dependency.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698