Make "gn analyze" know about all inputs for jinja_template()
* Renames compute_grit_inputs_for_analyze -> compute_inputs_for_analyze
* Computes .py inputs via exec_script (when compute_inputs_for_analyze=true)
* Enforce that sub-included .jinja files are listed in targets.
Bug: 843562
Change-Id: I3698c7846375530a86474bd5960bb002ac45f71a
Reviewed-on: https://chromium-review.googlesource.com/1112867
Reviewed-by: Eric Stevenson <[email protected]>
Reviewed-by: Dirk Pranke <[email protected]>
Commit-Queue: agrieve <[email protected]>
Cr-Commit-Position: refs/heads/master@{#570650}
diff --git a/tools/mb/mb.py b/tools/mb/mb.py
index e1f8152..df48080 100755
--- a/tools/mb/mb.py
+++ b/tools/mb/mb.py
@@ -739,13 +739,13 @@
self.FlattenMixins(mixin_vals['mixins'], vals, visited)
return vals
- def RunGNGen(self, vals, compute_grit_inputs_for_analyze=False):
+ def RunGNGen(self, vals, compute_inputs_for_analyze=False):
build_dir = self.args.path
cmd = self.GNCmd('gen', build_dir, '--check')
gn_args = self.GNArgs(vals)
- if compute_grit_inputs_for_analyze:
- gn_args += ' compute_grit_inputs_for_analyze=true'
+ if compute_inputs_for_analyze:
+ gn_args += ' compute_inputs_for_analyze=true'
# Since GN hasn't run yet, the build directory may not even exist.
self.MaybeMakeDirectory(self.ToAbsPath(build_dir))
@@ -1078,7 +1078,7 @@
def RunGNAnalyze(self, vals):
# Analyze runs before 'gn gen' now, so we need to run gn gen
# in order to ensure that we have a build directory.
- ret = self.RunGNGen(vals, compute_grit_inputs_for_analyze=True)
+ ret = self.RunGNGen(vals, compute_inputs_for_analyze=True)
if ret:
return ret