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

Unified Diff: tools/gn/template.cc

Issue 269723006: Add get_target_outputs function to GN (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 6 years, 7 months 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 | « tools/gn/target_generator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/template.cc
diff --git a/tools/gn/template.cc b/tools/gn/template.cc
index bf4eb6187804c08f4e2586ba9d9046151cc04aad..11dcf1ff199b3d2ad4bb8dd224ba08a70749c23b 100644
--- a/tools/gn/template.cc
+++ b/tools/gn/template.cc
@@ -62,6 +62,9 @@ Value Template::Invoke(Scope* scope,
ScopePerFileProvider per_file_provider(&template_scope, true);
+ // Targets defined in the template go in the collector for the invoking file.
+ template_scope.set_item_collector(scope->GetItemCollector());
+
// We jump through some hoops to avoid copying the invocation scope when
// setting it in the template scope (since the invocation scope may have
// large lists of source files in it and could be expensive to copy).
« no previous file with comments | « tools/gn/target_generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698