OLD | NEW |
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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 "\n" | 190 "\n" |
191 " A config is referenced by its label just like a target.\n" | 191 " A config is referenced by its label just like a target.\n" |
192 "\n" | 192 "\n" |
193 " The values in a config are additive only. If you want to remove a flag\n" | 193 " The values in a config are additive only. If you want to remove a flag\n" |
194 " you need to remove the corresponding config that sets it. The final\n" | 194 " you need to remove the corresponding config that sets it. The final\n" |
195 " set of flags, defines, etc. for a target is generated in this order:\n" | 195 " set of flags, defines, etc. for a target is generated in this order:\n" |
196 "\n" | 196 "\n" |
197 " 1. The values specified directly on the target (rather than using a\n" | 197 " 1. The values specified directly on the target (rather than using a\n" |
198 " config.\n" | 198 " config.\n" |
199 " 2. The configs specified in the target's \"configs\" list, in order.\n" | 199 " 2. The configs specified in the target's \"configs\" list, in order.\n" |
200 " 3. Direct dependent configs from a breadth-first traversal of the\n" | 200 " 3. Public_configs from a breadth-first traversal of the dependency\n" |
201 " dependency tree in the order that the targets appear in \"deps\".\n" | 201 " tree in the order that the targets appear in \"deps\".\n" |
202 " 4. All dependent configs from a breadth-first traversal of the\n" | 202 " 4. All dependent configs from a breadth-first traversal of the\n" |
203 " dependency tree in the order that the targets appear in \"deps\".\n" | 203 " dependency tree in the order that the targets appear in \"deps\".\n" |
204 "\n" | 204 "\n" |
205 "Variables valid in a config definition:\n" | 205 "Variables valid in a config definition:\n" |
206 CONFIG_VALUES_VARS_HELP | 206 CONFIG_VALUES_VARS_HELP |
207 "\n" | 207 "\n" |
208 "Variables on a target used to apply configs:\n" | 208 "Variables on a target used to apply configs:\n" |
209 " all_dependent_configs, configs, direct_dependent_configs,\n" | 209 " all_dependent_configs, configs, public_configs,\n" |
210 " forward_dependent_configs_from\n" | 210 " forward_dependent_configs_from\n" |
211 "\n" | 211 "\n" |
212 "Example:\n" | 212 "Example:\n" |
213 " config(\"myconfig\") {\n" | 213 " config(\"myconfig\") {\n" |
214 " includes = [ \"include/common\" ]\n" | 214 " includes = [ \"include/common\" ]\n" |
215 " defines = [ \"ENABLE_DOOM_MELON\" ]\n" | 215 " defines = [ \"ENABLE_DOOM_MELON\" ]\n" |
216 " }\n" | 216 " }\n" |
217 "\n" | 217 "\n" |
218 " executable(\"mything\") {\n" | 218 " executable(\"mything\") {\n" |
219 " configs = [ \":myconfig\" ]\n" | 219 " configs = [ \":myconfig\" ]\n" |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 return Value(); | 781 return Value(); |
782 return result; | 782 return result; |
783 } | 783 } |
784 | 784 |
785 // Otherwise it's a no-block function. | 785 // Otherwise it's a no-block function. |
786 return found_function->second.no_block_runner(scope, function, | 786 return found_function->second.no_block_runner(scope, function, |
787 args.list_value(), err); | 787 args.list_value(), err); |
788 } | 788 } |
789 | 789 |
790 } // namespace functions | 790 } // namespace functions |
OLD | NEW |