| Index: tools/gn/function_get_label_info.cc
|
| diff --git a/tools/gn/function_get_label_info.cc b/tools/gn/function_get_label_info.cc
|
| index 58cb96411a4267c6f181c45c42706d529168bffa..38ab152115d435da3322c34b238087fe7667897c 100644
|
| --- a/tools/gn/function_get_label_info.cc
|
| +++ b/tools/gn/function_get_label_info.cc
|
| @@ -15,71 +15,64 @@ const char kGetLabelInfo[] = "get_label_info";
|
| const char kGetLabelInfo_HelpShort[] =
|
| "get_label_info: Get an attribute from a target's label.";
|
| const char kGetLabelInfo_Help[] =
|
| - "get_label_info: Get an attribute from a target's label.\n"
|
| - "\n"
|
| - " get_label_info(target_label, what)\n"
|
| - "\n"
|
| - " Given the label of a target, returns some attribute of that target.\n"
|
| - " The target need not have been previously defined in the same file,\n"
|
| - " since none of the attributes depend on the actual target definition,\n"
|
| - " only the label itself.\n"
|
| - "\n"
|
| - " See also \"gn help get_target_outputs\".\n"
|
| - "\n"
|
| - "Possible values for the \"what\" parameter\n"
|
| - "\n"
|
| - " \"name\"\n"
|
| - " The short name of the target. This will match the value of the\n"
|
| - " \"target_name\" variable inside that target's declaration. For the\n"
|
| - " label \"//foo/bar:baz\" this will return \"baz\".\n"
|
| - "\n"
|
| - " \"dir\"\n"
|
| - " The directory containing the target's definition, with no slash at\n"
|
| - " the end. For the label \"//foo/bar:baz\" this will return\n"
|
| - " \"//foo/bar\".\n"
|
| - "\n"
|
| - " \"target_gen_dir\"\n"
|
| - " The generated file directory for the target. This will match the\n"
|
| - " value of the \"target_gen_dir\" variable when inside that target's\n"
|
| - " declaration.\n"
|
| - "\n"
|
| - " \"root_gen_dir\"\n"
|
| - " The root of the generated file tree for the target. This will\n"
|
| - " match the value of the \"root_gen_dir\" variable when inside that\n"
|
| - " target's declaration.\n"
|
| - "\n"
|
| - " \"target_out_dir\n"
|
| - " The output directory for the target. This will match the\n"
|
| - " value of the \"target_out_dir\" variable when inside that target's\n"
|
| - " declaration.\n"
|
| - "\n"
|
| - " \"root_out_dir\"\n"
|
| - " The root of the output file tree for the target. This will\n"
|
| - " match the value of the \"root_out_dir\" variable when inside that\n"
|
| - " target's declaration.\n"
|
| - "\n"
|
| - " \"label_no_toolchain\"\n"
|
| - " The fully qualified version of this label, not including the\n"
|
| - " toolchain. For the input \":bar\" it might return\n"
|
| - " \"//foo:bar\".\n"
|
| - "\n"
|
| - " \"label_with_toolchain\"\n"
|
| - " The fully qualified version of this label, including the\n"
|
| - " toolchain. For the input \":bar\" it might return\n"
|
| - " \"//foo:bar(//toolchain:x64)\".\n"
|
| - "\n"
|
| - " \"toolchain\"\n"
|
| - " The label of the toolchain. This will match the value of the\n"
|
| - " \"current_toolchain\" variable when inside that target's\n"
|
| - " declaration.\n"
|
| - "\n"
|
| - "Examples\n"
|
| - "\n"
|
| - " get_label_info(\":foo\", \"name\")\n"
|
| - " # Returns string \"foo\".\n"
|
| - "\n"
|
| - " get_label_info(\"//foo/bar:baz\", \"gen_dir\")\n"
|
| - " # Returns string \"//out/Debug/gen/foo/bar\".\n";
|
| + R"*(get_label_info: Get an attribute from a target's label.
|
| +
|
| + get_label_info(target_label, what)
|
| +
|
| + Given the label of a target, returns some attribute of that target. The
|
| + target need not have been previously defined in the same file, since none of
|
| + the attributes depend on the actual target definition, only the label itself.
|
| +
|
| + See also "gn help get_target_outputs".
|
| +
|
| +Possible values for the "what" parameter
|
| +
|
| + "name"
|
| + The short name of the target. This will match the value of the
|
| + "target_name" variable inside that target's declaration. For the label
|
| + "//foo/bar:baz" this will return "baz".
|
| +
|
| + "dir"
|
| + The directory containing the target's definition, with no slash at the
|
| + end. For the label "//foo/bar:baz" this will return "//foo/bar".
|
| +
|
| + "target_gen_dir"
|
| + The generated file directory for the target. This will match the value of
|
| + the "target_gen_dir" variable when inside that target's declaration.
|
| +
|
| + "root_gen_dir"
|
| + The root of the generated file tree for the target. This will match the
|
| + value of the "root_gen_dir" variable when inside that target's
|
| + declaration.
|
| +
|
| + "target_out_dir
|
| + The output directory for the target. This will match the value of the
|
| + "target_out_dir" variable when inside that target's declaration.
|
| +
|
| + "root_out_dir"
|
| + The root of the output file tree for the target. This will match the
|
| + value of the "root_out_dir" variable when inside that target's
|
| + declaration.
|
| +
|
| + "label_no_toolchain"
|
| + The fully qualified version of this label, not including the toolchain.
|
| + For the input ":bar" it might return "//foo:bar".
|
| +
|
| + "label_with_toolchain"
|
| + The fully qualified version of this label, including the toolchain. For
|
| + the input ":bar" it might return "//foo:bar(//toolchain:x64)".
|
| +
|
| + "toolchain"
|
| + The label of the toolchain. This will match the value of the
|
| + "current_toolchain" variable when inside that target's declaration.
|
| +
|
| +Examples
|
| +
|
| + get_label_info(":foo", "name")
|
| + # Returns string "foo".
|
| +
|
| + get_label_info("//foo/bar:baz", "gen_dir")
|
| + # Returns string "//out/Debug/gen/foo/bar".)*";
|
|
|
| Value RunGetLabelInfo(Scope* scope,
|
| const FunctionCallNode* function,
|
|
|