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/functions.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/functions.h ('k') | tools/gn/gn.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/functions.cc
diff --git a/tools/gn/functions.cc b/tools/gn/functions.cc
index 01463501708d7c75c21ecb8c4032b1528dd427af..3a19dfb8d2fb735c6c436152b85f6d2755689601 100644
--- a/tools/gn/functions.cc
+++ b/tools/gn/functions.cc
@@ -243,8 +243,14 @@ Value RunConfig(const FunctionCallNode* function,
if (err->has_error())
return Value();
- // Mark as complete.
- scope->settings()->build_settings()->ItemDefined(config.PassAs<Item>());
+ // Save the generated item.
+ Scope::ItemVector* collector = scope->GetItemCollector();
+ if (!collector) {
+ *err = Err(function, "Can't define a config in this context.");
+ return Value();
+ }
+ collector->push_back(new scoped_ptr<Item>(config.PassAs<Item>()));
+
return Value();
}
@@ -646,6 +652,7 @@ struct FunctionInfoInitializer {
INSERT_FUNCTION(Defined, false)
INSERT_FUNCTION(ExecScript, false)
INSERT_FUNCTION(GetEnv, false)
+ INSERT_FUNCTION(GetTargetOutputs, false)
INSERT_FUNCTION(Import, false)
INSERT_FUNCTION(Print, false)
INSERT_FUNCTION(ProcessFileTemplate, false)
« no previous file with comments | « tools/gn/functions.h ('k') | tools/gn/gn.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698