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

Side by Side 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, 5 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "tools/gn/ninja_bundle_data_target_writer.h" 5 #include "tools/gn/ninja_bundle_data_target_writer.h"
6 6
7 #include "tools/gn/output_file.h" 7 #include "tools/gn/output_file.h"
8 #include "tools/gn/settings.h"
9 #include "tools/gn/target.h"
8 10
9 NinjaBundleDataTargetWriter::NinjaBundleDataTargetWriter(const Target* target, 11 NinjaBundleDataTargetWriter::NinjaBundleDataTargetWriter(const Target* target,
10 std::ostream& out) 12 std::ostream& out)
11 : NinjaTargetWriter(target, out) {} 13 : NinjaTargetWriter(target, out) {}
12 14
13 NinjaBundleDataTargetWriter::~NinjaBundleDataTargetWriter() {} 15 NinjaBundleDataTargetWriter::~NinjaBundleDataTargetWriter() {}
14 16
15 void NinjaBundleDataTargetWriter::Run() { 17 void NinjaBundleDataTargetWriter::Run() {
16 std::vector<OutputFile> files; 18 std::vector<OutputFile> output_files;
17 files.push_back(WriteInputDepsStampAndGetDep(std::vector<const Target*>())); 19 for (const SourceFile& source_file : target_->sources()) {
18 WriteStampForTarget(files, std::vector<OutputFile>()); 20 output_files.push_back(
21 OutputFile(settings_->build_settings(), source_file));
22 }
23
24 std::vector<const Target*> extra_hard_deps;
25 OutputFile input_dep = WriteInputDepsStampAndGetDep(extra_hard_deps);
26 if (!input_dep.value().empty())
27 output_files.push_back(input_dep);
28
29 std::vector<OutputFile> order_only_deps;
30 for (const auto& pair : target_->data_deps())
31 order_only_deps.push_back(pair.ptr->dependency_output_file());
32
33 WriteStampForTarget(output_files, order_only_deps);
19 } 34 }
OLDNEW
« 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