| Index: tools/gn/function_toolchain.cc
|
| diff --git a/tools/gn/function_toolchain.cc b/tools/gn/function_toolchain.cc
|
| index b3821eca774e0c1a7bf4d0e9ed3ae78fd20550c2..377b92720ad26087819d50d3fd574e47ced9bcab 100644
|
| --- a/tools/gn/function_toolchain.cc
|
| +++ b/tools/gn/function_toolchain.cc
|
| @@ -160,13 +160,14 @@ const char kTool_Help[] =
|
| " given file type. See also \"gn help toolchain\".\n"
|
| "\n"
|
| "Command types:\n"
|
| + "\n"
|
| " The following values may be passed to the tool() function for the type\n"
|
| " of the command:\n"
|
| "\n"
|
| " \"cc\", \"cxx\", \"objc\", \"objcxx\", \"asm\", \"alink\", \"solink\",\n"
|
| " \"link\", \"stamp\", \"copy\"\n"
|
| "\n"
|
| - "Command flags:\n"
|
| + "Command flags\n"
|
| "\n"
|
| " These variables may be specified in the { } block after the tool call.\n"
|
| " They are passed directly to Ninja. See the ninja documentation for how\n"
|
| @@ -188,7 +189,37 @@ const char kTool_Help[] =
|
| " added to the link like with a \"-framework\" switch and the lib prefix\n"
|
| " will be ignored.\n"
|
| "\n"
|
| - "Example:\n"
|
| + "Ninja variables available to tool invocations\n"
|
| + "\n"
|
| + " When writing tool commands, you use the various built-in Ninja\n"
|
| + " variables like \"$in\" and \"$out\" (note that the $ must be escaped\n"
|
| + " for it to be passed to Ninja, so write \"\\$in\" in the command\n"
|
| + " string).\n"
|
| + "\n"
|
| + " GN defines the following variables for binary targets to access the\n"
|
| + " various computed information needed for compiling:\n"
|
| + "\n"
|
| + " - Compiler flags: \"cflags\", \"cflags_c\", \"cflags_cc\",\n"
|
| + " \"cflags_objc\", \"cflags_objcc\"\n"
|
| + "\n"
|
| + " - Linker flags: \"ldflags\", \"libs\"\n"
|
| + "\n"
|
| + " GN sets these other variables with target information that can be\n"
|
| + " used for computing names for supplimetary files:\n"
|
| + "\n"
|
| + " - \"target_name\": The name of the current target with no\n"
|
| + " path information. For example \"mylib\".\n"
|
| + "\n"
|
| + " - \"target_out_dir\": The value of \"target_out_dir\" from the BUILD\n"
|
| + " file for this target (see \"gn help target_out_dir\"), relative\n"
|
| + " to the root build directory with no trailing slash.\n"
|
| + "\n"
|
| + " - \"root_out_dir\": The value of \"root_out_dir\" from the BUILD\n"
|
| + " file for this target (see \"gn help root_out_dir\"), relative\n"
|
| + " to the root build directory with no trailing slash.\n"
|
| + "\n"
|
| + "Example\n"
|
| + "\n"
|
| " toolchain(\"my_toolchain\") {\n"
|
| " # Put these at the top to apply to all tools below.\n"
|
| " lib_prefix = \"-l\"\n"
|
|
|