Commit aca08753 authored by dpranke's avatar dpranke Committed by Commit bot

Make `gn refs` look at script files.

Currently, `gn refs` would not look at the script files listed in
action() and action_foreach() targets, so, for example
`gn refs out/Default //tools/grit/grit.py` would return no references.
This (a) is obviously incorrect, and (b) meant that analyze would
not handle this case correctly and compiles would get skipped as a result.

R=brettw@chromium.org
BUG=627667

Review-Url: https://codereview.chromium.org/2164773002
Cr-Commit-Position: refs/heads/master@{#406368}
parent edc23418
......@@ -145,6 +145,9 @@ bool TargetContainsFile(const Target* target, const SourceFile& file) {
return true;
}
if (target->action_values().script().value() == file.value())
return true;
std::vector<SourceFile> outputs;
target->action_values().GetOutputsAsSourceFiles(target, &outputs);
for (const auto& cur_file : outputs) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment