OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/switches.h" | 5 #include "tools/gn/switches.h" |
6 | 6 |
7 namespace switches { | 7 namespace switches { |
8 | 8 |
9 const char kArgs[] = "args"; | 9 const char kArgs[] = "args"; |
10 const char kArgs_HelpShort[] = | 10 const char kArgs_HelpShort[] = |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 " gn gen out/Default --color\n"\ | 51 " gn gen out/Default --color\n"\ |
52 "\n"\ | 52 "\n"\ |
53 " gn gen out/Default --nocolor\n" | 53 " gn gen out/Default --nocolor\n" |
54 const char kColor[] = "color"; | 54 const char kColor[] = "color"; |
55 const char kColor_HelpShort[] = | 55 const char kColor_HelpShort[] = |
56 "--color: Force colored output."; | 56 "--color: Force colored output."; |
57 const char kColor_Help[] = COLOR_HELP_LONG; | 57 const char kColor_Help[] = COLOR_HELP_LONG; |
58 | 58 |
59 const char kDotfile[] = "dotfile"; | 59 const char kDotfile[] = "dotfile"; |
60 const char kDotfile_HelpShort[] = | 60 const char kDotfile_HelpShort[] = |
61 "--dotfile: override the name of the \".gn\" file."; | 61 "--dotfile: Override the name of the \".gn\" file."; |
62 const char kDotfile_Help[] = | 62 const char kDotfile_Help[] = |
63 "--dotfile: override the name of the \".gn\" file.\n" | 63 "--dotfile: Override the name of the \".gn\" file.\n" |
64 "\n" | 64 "\n" |
65 " Normally GN loads the \".gn\"file from the source root for some basic\n" | 65 " Normally GN loads the \".gn\"file from the source root for some basic\n" |
66 " configuration (see \"gn help dotfile\"). This flag allows you to\n" | 66 " configuration (see \"gn help dotfile\"). This flag allows you to\n" |
67 " use a different file.\n" | 67 " use a different file.\n" |
68 "\n" | 68 "\n" |
69 " Note that this interacts with \"--root\" in a possibly incorrect way.\n" | 69 " Note that this interacts with \"--root\" in a possibly incorrect way.\n" |
70 " It would be nice to test the edge cases and document or fix.\n"; | 70 " It would be nice to test the edge cases and document or fix.\n"; |
71 | 71 |
72 const char kMarkdown[] = "markdown"; | 72 const char kMarkdown[] = "markdown"; |
73 const char kMarkdown_HelpShort[] = | 73 const char kMarkdown_HelpShort[] = |
(...skipping 27 matching lines...) Expand all Loading... |
101 "\n" | 101 "\n" |
102 " Specifying --root allows GN to do builds in a specific directory\n" | 102 " Specifying --root allows GN to do builds in a specific directory\n" |
103 " regardless of the current directory.\n" | 103 " regardless of the current directory.\n" |
104 "\n" | 104 "\n" |
105 "Examples\n" | 105 "Examples\n" |
106 "\n" | 106 "\n" |
107 " gn gen //out/Default --root=/home/baracko/src\n" | 107 " gn gen //out/Default --root=/home/baracko/src\n" |
108 "\n" | 108 "\n" |
109 " gn desc //out/Default --root=\"C:\\Users\\BObama\\My Documents\\foo\"\n"; | 109 " gn desc //out/Default --root=\"C:\\Users\\BObama\\My Documents\\foo\"\n"; |
110 | 110 |
| 111 const char kRuntimeDepsListFile[] = "runtime-deps-list-file"; |
| 112 const char kRuntimeDepsListFile_HelpShort[] = |
| 113 "--runtime-deps-list-file: Save runtime dependencies for targets in file."; |
| 114 const char kRuntimeDepsListFile_Help[] = |
| 115 "--runtime-deps-list-file: Save runtime dependencies for targets in file.\n" |
| 116 "\n" |
| 117 " --runtime-deps-list-file=<filename>\n" |
| 118 "\n" |
| 119 " Where <filename> is a text file consisting of the labels, one per\n" |
| 120 " line, of the targets for which runtime dependencies are desired.\n" |
| 121 "\n" |
| 122 " See \"gn help runtime_deps\" for a description of how runtime\n" |
| 123 " dependencies are computed.\n" |
| 124 "\n" |
| 125 "Runtime deps output file\n" |
| 126 "\n" |
| 127 " For each target requested, GN will write a separate runtime dependency\n" |
| 128 " file. The runtime dependency file will be in the output directory\n" |
| 129 " alongside the output file of the target, with a \".runtime_deps\"\n" |
| 130 " extension. For example, if the target \"//foo:bar\" is listed in the\n" |
| 131 " input file, and that target produces an output file \"bar.so\", GN\n" |
| 132 " will create a file \"bar.so.runtime_deps\" in the build directory.\n" |
| 133 "\n" |
| 134 " If a source set, action, copy, or group is listed, the runtime deps\n" |
| 135 " file will correspond to the .stamp file corresponding to that target.\n" |
| 136 " This is probably not useful; the use-case for this feature is\n" |
| 137 " generally executable targets.\n" |
| 138 "\n" |
| 139 " The runtime dependency file will list one file per line, with no\n" |
| 140 " escaping. The files will be relative to the root_build_dir. The first\n" |
| 141 " line of the file will be the main output file of the target itself\n" |
| 142 " (in the above example, \"bar.so\").\n"; |
| 143 |
111 const char kThreads[] = "threads"; | 144 const char kThreads[] = "threads"; |
112 const char kThreads_HelpShort[] = | 145 const char kThreads_HelpShort[] = |
113 "--threads: Specify number of worker threads."; | 146 "--threads: Specify number of worker threads."; |
114 const char kThreads_Help[] = | 147 const char kThreads_Help[] = |
115 "--threads: Specify number of worker threads.\n" | 148 "--threads: Specify number of worker threads.\n" |
116 "\n" | 149 "\n" |
117 " GN runs many threads to load and run build files. This can make\n" | 150 " GN runs many threads to load and run build files. This can make\n" |
118 " debugging challenging. Or you may want to experiment with different\n" | 151 " debugging challenging. Or you may want to experiment with different\n" |
119 " values to see how it affects performance.\n" | 152 " values to see how it affects performance.\n" |
120 "\n" | 153 "\n" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 const SwitchInfoMap& GetSwitches() { | 220 const SwitchInfoMap& GetSwitches() { |
188 static SwitchInfoMap info_map; | 221 static SwitchInfoMap info_map; |
189 if (info_map.empty()) { | 222 if (info_map.empty()) { |
190 INSERT_VARIABLE(Args) | 223 INSERT_VARIABLE(Args) |
191 INSERT_VARIABLE(Color) | 224 INSERT_VARIABLE(Color) |
192 INSERT_VARIABLE(Dotfile) | 225 INSERT_VARIABLE(Dotfile) |
193 INSERT_VARIABLE(Markdown) | 226 INSERT_VARIABLE(Markdown) |
194 INSERT_VARIABLE(NoColor) | 227 INSERT_VARIABLE(NoColor) |
195 INSERT_VARIABLE(Root) | 228 INSERT_VARIABLE(Root) |
196 INSERT_VARIABLE(Quiet) | 229 INSERT_VARIABLE(Quiet) |
| 230 INSERT_VARIABLE(RuntimeDepsListFile) |
197 INSERT_VARIABLE(Time) | 231 INSERT_VARIABLE(Time) |
198 INSERT_VARIABLE(Tracelog) | 232 INSERT_VARIABLE(Tracelog) |
199 INSERT_VARIABLE(Verbose) | 233 INSERT_VARIABLE(Verbose) |
200 INSERT_VARIABLE(Version) | 234 INSERT_VARIABLE(Version) |
201 } | 235 } |
202 return info_map; | 236 return info_map; |
203 } | 237 } |
204 | 238 |
205 #undef INSERT_VARIABLE | 239 #undef INSERT_VARIABLE |
206 | 240 |
207 } // namespace switches | 241 } // namespace switches |
OLD | NEW |