Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Unified Diff: tools/gn/ninja_target_writer.cc

Issue 2071573003: GN: Use implicit dependency for binary input deps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use implicit dependencies only for inputs Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698