| 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/err.h" | 5 #include "tools/gn/err.h" |
| 6 #include "tools/gn/functions.h" | 6 #include "tools/gn/functions.h" |
| 7 #include "tools/gn/parse_tree.h" | 7 #include "tools/gn/parse_tree.h" |
| 8 #include "tools/gn/scheduler.h" | 8 #include "tools/gn/scheduler.h" |
| 9 #include "tools/gn/scope.h" | 9 #include "tools/gn/scope.h" |
| 10 #include "tools/gn/settings.h" | 10 #include "tools/gn/settings.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 const char kTool_HelpShort[] = | 152 const char kTool_HelpShort[] = |
| 153 "tool: Specify arguments to a toolchain tool."; | 153 "tool: Specify arguments to a toolchain tool."; |
| 154 const char kTool_Help[] = | 154 const char kTool_Help[] = |
| 155 "tool: Specify arguments to a toolchain tool.\n" | 155 "tool: Specify arguments to a toolchain tool.\n" |
| 156 "\n" | 156 "\n" |
| 157 " tool(<command type>) { <command flags> }\n" | 157 " tool(<command type>) { <command flags> }\n" |
| 158 "\n" | 158 "\n" |
| 159 " Used inside a toolchain definition to define a command to run for a\n" | 159 " Used inside a toolchain definition to define a command to run for a\n" |
| 160 " given file type. See also \"gn help toolchain\".\n" | 160 " given file type. See also \"gn help toolchain\".\n" |
| 161 "\n" | 161 "\n" |
| 162 "Command types:\n" | 162 "Command types\n" |
| 163 "\n" | 163 "\n" |
| 164 " The following values may be passed to the tool() function for the type\n" | 164 " The following values may be passed to the tool() function for the type\n" |
| 165 " of the command:\n" | 165 " of the command:\n" |
| 166 "\n" | 166 "\n" |
| 167 " \"cc\", \"cxx\", \"objc\", \"objcxx\", \"asm\", \"alink\", \"solink\",\n" | 167 " \"cc\", \"cxx\", \"objc\", \"objcxx\", \"asm\", \"alink\", \"solink\",\n" |
| 168 " \"link\", \"stamp\", \"copy\"\n" | 168 " \"link\", \"stamp\", \"copy\"\n" |
| 169 "\n" | 169 "\n" |
| 170 "Tool-specific notes\n" |
| 171 "\n" |
| 172 " copy\n" |
| 173 " The copy command should be a native OS command since it does not\n" |
| 174 " implement toolchain dependencies (which would enable a copy tool to\n" |
| 175 " be compiled by a previous step).\n" |
| 176 "\n" |
| 177 " It is legal for the copy to not update the timestamp of the output\n" |
| 178 " file (as long as it's greater than or equal to the input file). This\n" |
| 179 " allows the copy command to be implemented as a hard link which can\n" |
| 180 " be more efficient.\n" |
| 181 "\n" |
| 170 "Command flags\n" | 182 "Command flags\n" |
| 171 "\n" | 183 "\n" |
| 172 " These variables may be specified in the { } block after the tool call.\n" | 184 " These variables may be specified in the { } block after the tool call.\n" |
| 173 " They are passed directly to Ninja. See the ninja documentation for how\n" | 185 " They are passed directly to Ninja. See the ninja documentation for how\n" |
| 174 " they work. Don't forget to backslash-escape $ required by Ninja to\n" | 186 " they work. Don't forget to backslash-escape $ required by Ninja to\n" |
| 175 " prevent GN from doing variable expansion.\n" | 187 " prevent GN from doing variable expansion.\n" |
| 176 "\n" | 188 "\n" |
| 177 " command, depfile, depsformat, description, pool, restat, rspfile,\n" | 189 " command, depfile, depsformat, description, pool, restat, rspfile,\n" |
| 178 " rspfile_content\n" | 190 " rspfile_content\n" |
| 179 "\n" | 191 "\n" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 return Value(); | 374 return Value(); |
| 363 | 375 |
| 364 Scope::KeyValueMap values; | 376 Scope::KeyValueMap values; |
| 365 block_scope.GetCurrentScopeValues(&values); | 377 block_scope.GetCurrentScopeValues(&values); |
| 366 toolchain->args() = values; | 378 toolchain->args() = values; |
| 367 | 379 |
| 368 return Value(); | 380 return Value(); |
| 369 } | 381 } |
| 370 | 382 |
| 371 } // namespace functions | 383 } // namespace functions |
| OLD | NEW |