| Index: tools/gn/command_refs.cc
|
| diff --git a/tools/gn/command_refs.cc b/tools/gn/command_refs.cc
|
| index 9c89114668d96bdf33acbaeca65c41f266ae0136..a97e9a759b9a697aa64610329bc1e2ef709af89d 100644
|
| --- a/tools/gn/command_refs.cc
|
| +++ b/tools/gn/command_refs.cc
|
| @@ -141,6 +141,13 @@ bool TargetContainsFile(const Target* target, const SourceFile& file) {
|
| if (cur_file == file.value())
|
| return true;
|
| }
|
| +
|
| + std::vector<SourceFile> outputs;
|
| + target->action_values().GetOutputsAsSourceFiles(target, &outputs);
|
| + for (const auto& cur_file : outputs) {
|
| + if (cur_file == file)
|
| + return true;
|
| + }
|
| return false;
|
| }
|
|
|
| @@ -286,9 +293,9 @@ const char kRefs_Help[] =
|
| " \"gn help label_pattern\" for details.\n"
|
| "\n"
|
| " - File name: The result will be which targets list the given file in\n"
|
| - " its \"inputs\", \"sources\", \"public\", or \"data\". Any input\n"
|
| - " that does not contain wildcards and does not match a target or a\n"
|
| - " config will be treated as a file.\n"
|
| + " its \"inputs\", \"sources\", \"public\", \"data\", or \"outputs\".\n"
|
| + " Any input that does not contain wildcards and does not match a\n"
|
| + " target or a config will be treated as a file.\n"
|
| "\n"
|
| " - Response file: If the input starts with an \"@\", it will be\n"
|
| " interpreted as a path to a file containing a list of labels or\n"
|
| @@ -391,7 +398,7 @@ int RunRefs(const std::vector<std::string>& args) {
|
| bool all_toolchains = cmdline->HasSwitch("all-toolchains");
|
|
|
| Setup* setup = new Setup;
|
| - setup->set_check_for_bad_items(false);
|
| + setup->build_settings().set_check_for_bad_items(false);
|
| if (!setup->DoSetup(args[0], false) || !setup->Run())
|
| return 1;
|
|
|
|
|