Chromium Code Reviews| 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 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 920 } | 920 } |
| 921 config("default_optimization") { | 921 config("default_optimization") { |
| 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"; |
|
brettw
2017/06/28 21:23:27
I think this can be deleted.
Petr Hosek
2017/06/28 23:42:32
Done.
| |
| 931 const char kConsole_HelpShort[] = | 931 const char kConsole_HelpShort[] = |
| 932 "console: [boolean] Run this action in the console pool."; | 932 "console: [label] Console 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: Console pool objects. |
| 935 | 935 |
| 936 Boolean. Defaults to false. | 936 Console pool is a special pool object that uses the built-in ninja "console" |
| 937 | 937 pool. Target using this pool will have access to real stdin and stdout, and |
| 938 Actions marked "console = true" will be run in the built-in ninja "console" | 938 output will not be buffered by ninja. This can be useful for long-running |
| 939 pool. They will have access to real stdin and stdout, and output will not be | 939 actions with progress logs, or actions that require user input. |
| 940 buffered by ninja. This can be useful for long-running actions with progress | |
| 941 logs, or actions that require user input. | |
| 942 | 940 |
| 943 Only one console pool target can run at any one time in Ninja. Refer to the | 941 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. | 942 Ninja documentation on the console pool for more info. |
| 945 | 943 |
| 946 Example | 944 Example |
| 947 | 945 |
| 948 action("long_action_with_progress_logs") { | 946 action("my_action") { |
| 949 console = true | 947 ... |
| 948 pool = console | |
| 949 ... | |
| 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 |
| 959 Lists files or directories required to run the given target. These are | 959 Lists files or directories required to run the given target. These are |
| (...skipping 474 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"; | |
| 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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1914 INSERT_VARIABLE(IncludeDirs) | 1931 INSERT_VARIABLE(IncludeDirs) |
| 1915 INSERT_VARIABLE(Inputs) | 1932 INSERT_VARIABLE(Inputs) |
| 1916 INSERT_VARIABLE(Ldflags) | 1933 INSERT_VARIABLE(Ldflags) |
| 1917 INSERT_VARIABLE(Libs) | 1934 INSERT_VARIABLE(Libs) |
| 1918 INSERT_VARIABLE(LibDirs) | 1935 INSERT_VARIABLE(LibDirs) |
| 1919 INSERT_VARIABLE(OutputDir) | 1936 INSERT_VARIABLE(OutputDir) |
| 1920 INSERT_VARIABLE(OutputExtension) | 1937 INSERT_VARIABLE(OutputExtension) |
| 1921 INSERT_VARIABLE(OutputName) | 1938 INSERT_VARIABLE(OutputName) |
| 1922 INSERT_VARIABLE(OutputPrefixOverride) | 1939 INSERT_VARIABLE(OutputPrefixOverride) |
| 1923 INSERT_VARIABLE(Outputs) | 1940 INSERT_VARIABLE(Outputs) |
| 1941 INSERT_VARIABLE(Pool) | |
| 1924 INSERT_VARIABLE(PrecompiledHeader) | 1942 INSERT_VARIABLE(PrecompiledHeader) |
| 1925 INSERT_VARIABLE(PrecompiledHeaderType) | 1943 INSERT_VARIABLE(PrecompiledHeaderType) |
| 1926 INSERT_VARIABLE(PrecompiledSource) | 1944 INSERT_VARIABLE(PrecompiledSource) |
| 1927 INSERT_VARIABLE(ProductType) | 1945 INSERT_VARIABLE(ProductType) |
| 1928 INSERT_VARIABLE(Public) | 1946 INSERT_VARIABLE(Public) |
| 1929 INSERT_VARIABLE(PublicConfigs) | 1947 INSERT_VARIABLE(PublicConfigs) |
| 1930 INSERT_VARIABLE(PublicDeps) | 1948 INSERT_VARIABLE(PublicDeps) |
| 1931 INSERT_VARIABLE(ResponseFileContents) | 1949 INSERT_VARIABLE(ResponseFileContents) |
| 1932 INSERT_VARIABLE(Script) | 1950 INSERT_VARIABLE(Script) |
| 1933 INSERT_VARIABLE(Sources) | 1951 INSERT_VARIABLE(Sources) |
| 1934 INSERT_VARIABLE(Testonly) | 1952 INSERT_VARIABLE(Testonly) |
| 1935 INSERT_VARIABLE(Visibility) | 1953 INSERT_VARIABLE(Visibility) |
| 1936 INSERT_VARIABLE(WriteRuntimeDeps) | 1954 INSERT_VARIABLE(WriteRuntimeDeps) |
| 1937 } | 1955 } |
| 1938 return info_map; | 1956 return info_map; |
| 1939 } | 1957 } |
| 1940 | 1958 |
| 1941 #undef INSERT_VARIABLE | 1959 #undef INSERT_VARIABLE |
| 1942 | 1960 |
| 1943 } // namespace variables | 1961 } // namespace variables |
| OLD | NEW |