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

Unified Diff: tools/gn/ninja_bundle_data_target_writer.cc

Issue 2105613003: Fix dependencies rules for create_bundle and bundle_data ninja steps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove stamps (to allow using hardlinks) 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
« no previous file with comments | « tools/gn/gn.gyp ('k') | tools/gn/ninja_bundle_data_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_bundle_data_target_writer.cc
diff --git a/tools/gn/ninja_bundle_data_target_writer.cc b/tools/gn/ninja_bundle_data_target_writer.cc
index 67b5a10e15b4273ed334ab2d1435b75f101e265e..26bfefbd4328cc8d04f27335bede23b68fa9cfee 100644
--- a/tools/gn/ninja_bundle_data_target_writer.cc
+++ b/tools/gn/ninja_bundle_data_target_writer.cc
@@ -5,6 +5,8 @@
#include "tools/gn/ninja_bundle_data_target_writer.h"
#include "tools/gn/output_file.h"
+#include "tools/gn/settings.h"
+#include "tools/gn/target.h"
NinjaBundleDataTargetWriter::NinjaBundleDataTargetWriter(const Target* target,
std::ostream& out)
@@ -13,7 +15,20 @@ NinjaBundleDataTargetWriter::NinjaBundleDataTargetWriter(const Target* target,
NinjaBundleDataTargetWriter::~NinjaBundleDataTargetWriter() {}
void NinjaBundleDataTargetWriter::Run() {
- std::vector<OutputFile> files;
- files.push_back(WriteInputDepsStampAndGetDep(std::vector<const Target*>()));
- WriteStampForTarget(files, std::vector<OutputFile>());
+ std::vector<OutputFile> output_files;
+ for (const SourceFile& source_file : target_->sources()) {
+ output_files.push_back(
+ OutputFile(settings_->build_settings(), source_file));
+ }
+
+ std::vector<const Target*> extra_hard_deps;
+ OutputFile input_dep = WriteInputDepsStampAndGetDep(extra_hard_deps);
+ if (!input_dep.value().empty())
+ output_files.push_back(input_dep);
+
+ std::vector<OutputFile> order_only_deps;
+ for (const auto& pair : target_->data_deps())
+ order_only_deps.push_back(pair.ptr->dependency_output_file());
+
+ WriteStampForTarget(output_files, order_only_deps);
}
« no previous file with comments | « tools/gn/gn.gyp ('k') | tools/gn/ninja_bundle_data_target_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698