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/variables.h" | 5 #include "tools/gn/variables.h" |
6 | 6 |
7 namespace variables { | 7 namespace variables { |
8 | 8 |
9 // Built-in variables ---------------------------------------------------------- | 9 // Built-in variables ---------------------------------------------------------- |
10 | 10 |
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
922 if (optimize_everything) { | 922 if (optimize_everything) { |
923 configs = [ ":super_optimization" ] | 923 configs = [ ":super_optimization" ] |
924 } else { | 924 } else { |
925 configs = [ ":no_optimization" ] | 925 configs = [ ":no_optimization" ] |
926 } | 926 } |
927 } | 927 } |
928 )"; | 928 )"; |
929 | 929 |
930 const char kConsole[] = "console"; | 930 const char kConsole[] = "console"; |
931 const char kConsole_HelpShort[] = | 931 const char kConsole_HelpShort[] = |
932 "console: [boolean] Run this action in the console pool."; | 932 "console: [boolean] Use console pool for the pool object."; |
933 const char kConsole_Help[] = | 933 const char kConsole_Help[] = |
934 R"(console: Run this action in the console pool. | 934 R"(console: Use console pool for the pool object. |
935 | 935 |
936 Boolean. Defaults to false. | 936 Boolean. Defaults to false. |
937 | 937 |
938 Actions marked "console = true" will be run in the built-in ninja "console" | 938 Pool objects marked "console = true" will use the built-in ninja "console" |
939 pool. They will have access to real stdin and stdout, and output will not be | 939 pool. They will have access to real stdin and stdout, and output will not be |
940 buffered by ninja. This can be useful for long-running actions with progress | 940 buffered by ninja. This can be useful for long-running actions with progress |
941 logs, or actions that require user input. | 941 logs, or actions that require user input. |
942 | 942 |
943 Only one console pool target can run at any one time in Ninja. Refer to the | 943 Only one console pool target can run at any one time in Ninja. Refer to the |
944 Ninja documentation on the console pool for more info. | 944 Ninja documentation on the console pool for more info. |
945 | 945 |
946 Example | 946 Example |
947 | 947 |
948 action("long_action_with_progress_logs") { | 948 pool("action_pool") { |
949 console = true | 949 console = true |
950 } | 950 } |
951 )"; | 951 )"; |
952 | 952 |
953 const char kData[] = "data"; | 953 const char kData[] = "data"; |
954 const char kData_HelpShort[] = | 954 const char kData_HelpShort[] = |
955 "data: [file list] Runtime data file dependencies."; | 955 "data: [file list] Runtime data file dependencies."; |
956 const char kData_Help[] = | 956 const char kData_Help[] = |
957 R"(data: Runtime data file dependencies. | 957 R"(data: Runtime data file dependencies. |
958 | 958 |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1434 Action_foreach targets must always use source expansions to map input files | 1434 Action_foreach targets must always use source expansions to map input files |
1435 to output files. There can be more than one output, which means that each | 1435 to output files. There can be more than one output, which means that each |
1436 invocation of the script will produce a set of files (presumably based on | 1436 invocation of the script will produce a set of files (presumably based on |
1437 the name of the input file). See "gn help action_foreach". | 1437 the name of the input file). See "gn help action_foreach". |
1438 | 1438 |
1439 action | 1439 action |
1440 Action targets (excluding action_foreach) must list literal output file(s) | 1440 Action targets (excluding action_foreach) must list literal output file(s) |
1441 with no source expansions. See "gn help action". | 1441 with no source expansions. See "gn help action". |
1442 )"; | 1442 )"; |
1443 | 1443 |
1444 const char kPool[] = "pool"; | |
brettw
2017/06/13 21:59:16
Did you have any thouhgs on how to fix the "gn hel
Petr Hosek
2017/06/17 02:44:25
I tried to modify help command to handle the case
| |
1445 const char kPool_HelpShort[] = | |
1446 "pool: [string] Label of the pool used by the action."; | |
1447 const char kPool_Help[] = | |
1448 R"(pool: Label of the pool used by the action. | |
1449 | |
1450 A fully-qualified label representing the pool that will be used for the | |
1451 action. Pools are defined using the pool() {...} declaration. | |
1452 | |
1453 Example | |
1454 | |
1455 action("action") { | |
1456 pool = "//build:custom_pool" | |
1457 ... | |
1458 } | |
1459 )"; | |
1460 | |
1444 const char kPrecompiledHeader[] = "precompiled_header"; | 1461 const char kPrecompiledHeader[] = "precompiled_header"; |
1445 const char kPrecompiledHeader_HelpShort[] = | 1462 const char kPrecompiledHeader_HelpShort[] = |
1446 "precompiled_header: [string] Header file to precompile."; | 1463 "precompiled_header: [string] Header file to precompile."; |
1447 const char kPrecompiledHeader_Help[] = | 1464 const char kPrecompiledHeader_Help[] = |
1448 R"(precompiled_header: [string] Header file to precompile. | 1465 R"(precompiled_header: [string] Header file to precompile. |
1449 | 1466 |
1450 Precompiled headers will be used when a target specifies this value, or a | 1467 Precompiled headers will be used when a target specifies this value, or a |
1451 config applying to this target specifies this value. In addition, the tool | 1468 config applying to this target specifies this value. In addition, the tool |
1452 corresponding to the source files must also specify precompiled headers (see | 1469 corresponding to the source files must also specify precompiled headers (see |
1453 "gn help tool"). The tool will also specify what type of precompiled headers | 1470 "gn help tool"). The tool will also specify what type of precompiled headers |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1934 INSERT_VARIABLE(Testonly) | 1951 INSERT_VARIABLE(Testonly) |
1935 INSERT_VARIABLE(Visibility) | 1952 INSERT_VARIABLE(Visibility) |
1936 INSERT_VARIABLE(WriteRuntimeDeps) | 1953 INSERT_VARIABLE(WriteRuntimeDeps) |
1937 } | 1954 } |
1938 return info_map; | 1955 return info_map; |
1939 } | 1956 } |
1940 | 1957 |
1941 #undef INSERT_VARIABLE | 1958 #undef INSERT_VARIABLE |
1942 | 1959 |
1943 } // namespace variables | 1960 } // namespace variables |
OLD | NEW |