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

Side by Side Diff: tools/gn/functions.cc

Issue 1510663002: Reference configs variable from config help in GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "tools/gn/functions.h" 5 #include "tools/gn/functions.h"
6 6
7 #include <iostream> 7 #include <iostream>
8 8
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 " set of flags, defines, etc. for a target is generated in this order:\n" 254 " set of flags, defines, etc. for a target is generated in this order:\n"
255 "\n" 255 "\n"
256 " 1. The values specified directly on the target (rather than using a\n" 256 " 1. The values specified directly on the target (rather than using a\n"
257 " config.\n" 257 " config.\n"
258 " 2. The configs specified in the target's \"configs\" list, in order.\n" 258 " 2. The configs specified in the target's \"configs\" list, in order.\n"
259 " 3. Public_configs from a breadth-first traversal of the dependency\n" 259 " 3. Public_configs from a breadth-first traversal of the dependency\n"
260 " tree in the order that the targets appear in \"deps\".\n" 260 " tree in the order that the targets appear in \"deps\".\n"
261 " 4. All dependent configs from a breadth-first traversal of the\n" 261 " 4. All dependent configs from a breadth-first traversal of the\n"
262 " dependency tree in the order that the targets appear in \"deps\".\n" 262 " dependency tree in the order that the targets appear in \"deps\".\n"
263 "\n" 263 "\n"
264 "Variables valid in a config definition:\n" 264 "Variables valid in a config definition\n"
265 "\n"
265 CONFIG_VALUES_VARS_HELP 266 CONFIG_VALUES_VARS_HELP
267 " Nested configs: configs\n"
266 "\n" 268 "\n"
267 "Variables on a target used to apply configs:\n" 269 "Variables on a target used to apply configs\n"
270 "\n"
268 " all_dependent_configs, configs, public_configs\n" 271 " all_dependent_configs, configs, public_configs\n"
269 "\n" 272 "\n"
270 "Example:\n" 273 "Example\n"
274 "\n"
271 " config(\"myconfig\") {\n" 275 " config(\"myconfig\") {\n"
272 " includes = [ \"include/common\" ]\n" 276 " includes = [ \"include/common\" ]\n"
273 " defines = [ \"ENABLE_DOOM_MELON\" ]\n" 277 " defines = [ \"ENABLE_DOOM_MELON\" ]\n"
274 " }\n" 278 " }\n"
275 "\n" 279 "\n"
276 " executable(\"mything\") {\n" 280 " executable(\"mything\") {\n"
277 " configs = [ \":myconfig\" ]\n" 281 " configs = [ \":myconfig\" ]\n"
278 " }\n"; 282 " }\n";
279 283
280 Value RunConfig(const FunctionCallNode* function, 284 Value RunConfig(const FunctionCallNode* function,
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 } 917 }
914 918
915 // Otherwise it's a no-block function. 919 // Otherwise it's a no-block function.
916 if (!VerifyNoBlockForFunctionCall(function, block, err)) 920 if (!VerifyNoBlockForFunctionCall(function, block, err))
917 return Value(); 921 return Value();
918 return found_function->second.no_block_runner(scope, function, 922 return found_function->second.no_block_runner(scope, function,
919 args.list_value(), err); 923 args.list_value(), err);
920 } 924 }
921 925
922 } // namespace functions 926 } // namespace functions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698