Index: tools/gn/ninja_target_writer.cc |
diff --git a/tools/gn/ninja_target_writer.cc b/tools/gn/ninja_target_writer.cc |
index 486930bd2ffeb224f6985d16860ee42c2431a8ce..3c69e6fffe041a1acca161a06b9ed7fcfee92f5a 100644 |
--- a/tools/gn/ninja_target_writer.cc |
+++ b/tools/gn/ninja_target_writer.cc |
@@ -165,9 +165,12 @@ OutputFile NinjaTargetWriter::WriteInputDepsStampAndGetDep( |
target_->output_type() == Target::ACTION_FOREACH) |
input_deps_sources.push_back(&target_->action_values().script()); |
- // Input files. |
- for (const auto& input : target_->inputs()) |
- input_deps_sources.push_back(&input); |
+ // Input files are only considered for non-binary targets which use an |
+ // implicit dependency instead. |
brettw
2016/06/17 17:54:20
Can you mentioned that the implicit dep in this ca
Petr Hosek
2016/06/17 18:59:30
Done.
|
+ if (!target_->IsBinary()) { |
+ for (const auto& input : target_->inputs()) |
+ input_deps_sources.push_back(&input); |
+ } |
// For an action (where we run a script only once) the sources are the same |
// as the inputs. For action_foreach, the sources will be operated on |