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

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

Issue 2926013002: Support explicit pools in actions (Closed)
Patch Set: Remove console altogether Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « tools/gn/variables.h ('k') | 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/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
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";
931 const char kConsole_HelpShort[] =
932 "console: [boolean] Run this action in the console pool.";
933 const char kConsole_Help[] =
934 R"(console: Run this action in the console pool.
935
936 Boolean. Defaults to false.
937
938 Actions marked "console = true" will be run in the built-in ninja "console"
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
941 logs, or actions that require user input.
942
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.
945
946 Example
947
948 action("long_action_with_progress_logs") {
949 console = true
950 }
951 )";
952
953 const char kData[] = "data"; 930 const char kData[] = "data";
954 const char kData_HelpShort[] = 931 const char kData_HelpShort[] =
955 "data: [file list] Runtime data file dependencies."; 932 "data: [file list] Runtime data file dependencies.";
956 const char kData_Help[] = 933 const char kData_Help[] =
957 R"(data: Runtime data file dependencies. 934 R"(data: Runtime data file dependencies.
958 935
959 Lists files or directories required to run the given target. These are 936 Lists files or directories required to run the given target. These are
960 typically data files or directories of data files. The paths are interpreted 937 typically data files or directories of data files. The paths are interpreted
961 as being relative to the current build file. Since these are runtime 938 as being relative to the current build file. Since these are runtime
962 dependencies, they do not affect which targets are built or when. To declare 939 dependencies, they do not affect which targets are built or when. To declare
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1434 Action_foreach targets must always use source expansions to map input files 1411 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 1412 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 1413 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". 1414 the name of the input file). See "gn help action_foreach".
1438 1415
1439 action 1416 action
1440 Action targets (excluding action_foreach) must list literal output file(s) 1417 Action targets (excluding action_foreach) must list literal output file(s)
1441 with no source expansions. See "gn help action". 1418 with no source expansions. See "gn help action".
1442 )"; 1419 )";
1443 1420
1421 const char kPool[] = "pool";
1422 const char kPool_HelpShort[] =
1423 "pool: [string] Label of the pool used by the action.";
1424 const char kPool_Help[] =
1425 R"(pool: Label of the pool used by the action.
1426
1427 A fully-qualified label representing the pool that will be used for the
1428 action. Pools are defined using the pool() {...} declaration.
1429
1430 Example
1431
1432 action("action") {
1433 pool = "//build:custom_pool"
1434 ...
1435 }
1436 )";
1437
1444 const char kPrecompiledHeader[] = "precompiled_header"; 1438 const char kPrecompiledHeader[] = "precompiled_header";
1445 const char kPrecompiledHeader_HelpShort[] = 1439 const char kPrecompiledHeader_HelpShort[] =
1446 "precompiled_header: [string] Header file to precompile."; 1440 "precompiled_header: [string] Header file to precompile.";
1447 const char kPrecompiledHeader_Help[] = 1441 const char kPrecompiledHeader_Help[] =
1448 R"(precompiled_header: [string] Header file to precompile. 1442 R"(precompiled_header: [string] Header file to precompile.
1449 1443
1450 Precompiled headers will be used when a target specifies this value, or a 1444 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 1445 config applying to this target specifies this value. In addition, the tool
1452 corresponding to the source files must also specify precompiled headers (see 1446 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 1447 "gn help tool"). The tool will also specify what type of precompiled headers
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
1898 INSERT_VARIABLE(CflagsCC) 1892 INSERT_VARIABLE(CflagsCC)
1899 INSERT_VARIABLE(CflagsObjC) 1893 INSERT_VARIABLE(CflagsObjC)
1900 INSERT_VARIABLE(CflagsObjCC) 1894 INSERT_VARIABLE(CflagsObjCC)
1901 INSERT_VARIABLE(CheckIncludes) 1895 INSERT_VARIABLE(CheckIncludes)
1902 INSERT_VARIABLE(CodeSigningArgs) 1896 INSERT_VARIABLE(CodeSigningArgs)
1903 INSERT_VARIABLE(CodeSigningScript) 1897 INSERT_VARIABLE(CodeSigningScript)
1904 INSERT_VARIABLE(CodeSigningSources) 1898 INSERT_VARIABLE(CodeSigningSources)
1905 INSERT_VARIABLE(CodeSigningOutputs) 1899 INSERT_VARIABLE(CodeSigningOutputs)
1906 INSERT_VARIABLE(CompleteStaticLib) 1900 INSERT_VARIABLE(CompleteStaticLib)
1907 INSERT_VARIABLE(Configs) 1901 INSERT_VARIABLE(Configs)
1908 INSERT_VARIABLE(Console)
1909 INSERT_VARIABLE(Data) 1902 INSERT_VARIABLE(Data)
1910 INSERT_VARIABLE(DataDeps) 1903 INSERT_VARIABLE(DataDeps)
1911 INSERT_VARIABLE(Defines) 1904 INSERT_VARIABLE(Defines)
1912 INSERT_VARIABLE(Depfile) 1905 INSERT_VARIABLE(Depfile)
1913 INSERT_VARIABLE(Deps) 1906 INSERT_VARIABLE(Deps)
1914 INSERT_VARIABLE(IncludeDirs) 1907 INSERT_VARIABLE(IncludeDirs)
1915 INSERT_VARIABLE(Inputs) 1908 INSERT_VARIABLE(Inputs)
1916 INSERT_VARIABLE(Ldflags) 1909 INSERT_VARIABLE(Ldflags)
1917 INSERT_VARIABLE(Libs) 1910 INSERT_VARIABLE(Libs)
1918 INSERT_VARIABLE(LibDirs) 1911 INSERT_VARIABLE(LibDirs)
1919 INSERT_VARIABLE(OutputDir) 1912 INSERT_VARIABLE(OutputDir)
1920 INSERT_VARIABLE(OutputExtension) 1913 INSERT_VARIABLE(OutputExtension)
1921 INSERT_VARIABLE(OutputName) 1914 INSERT_VARIABLE(OutputName)
1922 INSERT_VARIABLE(OutputPrefixOverride) 1915 INSERT_VARIABLE(OutputPrefixOverride)
1923 INSERT_VARIABLE(Outputs) 1916 INSERT_VARIABLE(Outputs)
1917 INSERT_VARIABLE(Pool)
1924 INSERT_VARIABLE(PrecompiledHeader) 1918 INSERT_VARIABLE(PrecompiledHeader)
1925 INSERT_VARIABLE(PrecompiledHeaderType) 1919 INSERT_VARIABLE(PrecompiledHeaderType)
1926 INSERT_VARIABLE(PrecompiledSource) 1920 INSERT_VARIABLE(PrecompiledSource)
1927 INSERT_VARIABLE(ProductType) 1921 INSERT_VARIABLE(ProductType)
1928 INSERT_VARIABLE(Public) 1922 INSERT_VARIABLE(Public)
1929 INSERT_VARIABLE(PublicConfigs) 1923 INSERT_VARIABLE(PublicConfigs)
1930 INSERT_VARIABLE(PublicDeps) 1924 INSERT_VARIABLE(PublicDeps)
1931 INSERT_VARIABLE(ResponseFileContents) 1925 INSERT_VARIABLE(ResponseFileContents)
1932 INSERT_VARIABLE(Script) 1926 INSERT_VARIABLE(Script)
1933 INSERT_VARIABLE(Sources) 1927 INSERT_VARIABLE(Sources)
1934 INSERT_VARIABLE(Testonly) 1928 INSERT_VARIABLE(Testonly)
1935 INSERT_VARIABLE(Visibility) 1929 INSERT_VARIABLE(Visibility)
1936 INSERT_VARIABLE(WriteRuntimeDeps) 1930 INSERT_VARIABLE(WriteRuntimeDeps)
1937 } 1931 }
1938 return info_map; 1932 return info_map;
1939 } 1933 }
1940 1934
1941 #undef INSERT_VARIABLE 1935 #undef INSERT_VARIABLE
1942 1936
1943 } // namespace variables 1937 } // namespace variables
OLDNEW
« no previous file with comments | « tools/gn/variables.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698