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

Unified Diff: tools/gn/functions.cc

Issue 1263053003: Add forward_variables_from() and target() to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More spelling fixes Created 5 years, 4 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/functions_target.cc » ('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 c99075ae25cdaef82c5d704e0c72e6d28d90a688..0d86093105c345cf4d2eec6f31dd63ee4111e23c 100644
--- a/tools/gn/functions.cc
+++ b/tools/gn/functions.cc
@@ -709,6 +709,7 @@ struct FunctionInfoInitializer {
INSERT_FUNCTION(SharedLibrary, true)
INSERT_FUNCTION(SourceSet, true)
INSERT_FUNCTION(StaticLibrary, true)
+ INSERT_FUNCTION(Target, true)
INSERT_FUNCTION(Assert, false)
INSERT_FUNCTION(Config, false)
@@ -716,6 +717,7 @@ struct FunctionInfoInitializer {
INSERT_FUNCTION(Defined, false)
INSERT_FUNCTION(ExecScript, false)
INSERT_FUNCTION(ForEach, false)
+ INSERT_FUNCTION(ForwardVariablesFrom, false)
INSERT_FUNCTION(GetEnv, false)
INSERT_FUNCTION(GetLabelInfo, false)
INSERT_FUNCTION(GetPathInfo, false)
@@ -769,10 +771,9 @@ Value RunFunction(Scope* scope,
}
if (found_function->second.self_evaluating_args_runner) {
- // Self evaluating args functions are special weird built-ins. Currently,
- // only foreach() takes a block following it. Rather than force them all to
- // check that they have a block or no block and risk bugs for new additions,
- // check a whitelist here.
+ // Self evaluating args functions are special weird built-ins like foreach.
+ // Rather than force them all to check that they have a block or no block
+ // and risk bugs for new additions, check a whitelist here.
if (found_function->second.self_evaluating_args_runner != &RunForEach) {
if (!VerifyNoBlockForFunctionCall(function, block, err))
return Value();
« no previous file with comments | « tools/gn/functions.h ('k') | tools/gn/functions_target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698