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

Unified Diff: tools/gn/ninja_action_target_writer.cc

Issue 561273003: Add public deps to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 6 years, 3 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
« no previous file with comments | « tools/gn/header_checker_unittest.cc ('k') | tools/gn/ninja_action_target_writer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/ninja_action_target_writer.cc
diff --git a/tools/gn/ninja_action_target_writer.cc b/tools/gn/ninja_action_target_writer.cc
index 8ebe6ff42e9280e07b0f7152edf14f3945b39a9d..fe62f6305c0c08610de0b32b63107f9a456b7c7f 100644
--- a/tools/gn/ninja_action_target_writer.cc
+++ b/tools/gn/ninja_action_target_writer.cc
@@ -5,6 +5,7 @@
#include "tools/gn/ninja_action_target_writer.h"
#include "base/strings/string_util.h"
+#include "tools/gn/deps_iterator.h"
#include "tools/gn/err.h"
#include "tools/gn/settings.h"
#include "tools/gn/string_utils.h"
@@ -31,8 +32,9 @@ void NinjaActionTargetWriter::Run() {
// operating on the result of that previous step, so we need to be sure to
// serialize these.
std::vector<const Target*> extra_hard_deps;
- for (size_t i = 0; i < target_->deps().size(); i++)
- extra_hard_deps.push_back(target_->deps()[i].ptr);
+ for (DepsIterator iter(target_, DepsIterator::LINKED_ONLY);
+ !iter.done(); iter.Advance())
+ extra_hard_deps.push_back(iter.target());
// For ACTIONs this is a bit inefficient since it creates an input dep
// stamp file even though we're only going to use it once. It would save a
@@ -75,12 +77,12 @@ void NinjaActionTargetWriter::Run() {
}
out_ << std::endl;
- // Write the stamp, which also depends on all datadeps. These are needed at
+ // Write the stamp, which also depends on all data deps. These are needed at
// runtime and should be compiled when the action is, but don't need to be
// done before we run the action.
std::vector<OutputFile> data_outs;
- for (size_t i = 0; i < target_->datadeps().size(); i++)
- data_outs.push_back(target_->datadeps()[i].ptr->dependency_output_file());
+ for (size_t i = 0; i < target_->data_deps().size(); i++)
+ data_outs.push_back(target_->data_deps()[i].ptr->dependency_output_file());
WriteStampForTarget(output_files, data_outs);
}
« no previous file with comments | « tools/gn/header_checker_unittest.cc ('k') | tools/gn/ninja_action_target_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698