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

Unified Diff: tools/gn/ninja_group_target_writer.cc

Issue 440333002: Support more configurability in GN toolchains (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unsigned check Created 6 years, 4 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/ninja_group_target_writer.h ('k') | tools/gn/ninja_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/ninja_group_target_writer.cc
diff --git a/tools/gn/ninja_group_target_writer.cc b/tools/gn/ninja_group_target_writer.cc
index d29f917561240e8ff6d27b65de01626b8f289110..6a02cf1eb023340b74e3966204c405777066f458 100644
--- a/tools/gn/ninja_group_target_writer.cc
+++ b/tools/gn/ninja_group_target_writer.cc
@@ -5,12 +5,13 @@
#include "tools/gn/ninja_group_target_writer.h"
#include "base/strings/string_util.h"
+#include "tools/gn/output_file.h"
#include "tools/gn/string_utils.h"
+#include "tools/gn/target.h"
NinjaGroupTargetWriter::NinjaGroupTargetWriter(const Target* target,
- const Toolchain* toolchain,
std::ostream& out)
- : NinjaTargetWriter(target, toolchain, out) {
+ : NinjaTargetWriter(target, out) {
}
NinjaGroupTargetWriter::~NinjaGroupTargetWriter() {
@@ -18,23 +19,16 @@ NinjaGroupTargetWriter::~NinjaGroupTargetWriter() {
void NinjaGroupTargetWriter::Run() {
// A group rule just generates a stamp file with dependencies on each of
- // the deps in the group.
- out_ << std::endl << "build ";
- path_output_.WriteFile(out_, helper_.GetTargetOutputFile(target_));
- out_ << ": "
- << helper_.GetRulePrefix(target_->settings())
- << "stamp";
-
+ // the deps and datadeps in the group.
+ std::vector<OutputFile> output_files;
const LabelTargetVector& deps = target_->deps();
- for (size_t i = 0; i < deps.size(); i++) {
- out_ << " ";
- path_output_.WriteFile(out_, helper_.GetTargetOutputFile(deps[i].ptr));
- }
+ for (size_t i = 0; i < deps.size(); i++)
+ output_files.push_back(deps[i].ptr->dependency_output_file());
+ std::vector<OutputFile> data_output_files;
const LabelTargetVector& datadeps = target_->datadeps();
- for (size_t i = 0; i < datadeps.size(); i++) {
- out_ << " ";
- path_output_.WriteFile(out_, helper_.GetTargetOutputFile(datadeps[i].ptr));
- }
- out_ << std::endl;
+ for (size_t i = 0; i < datadeps.size(); i++)
+ data_output_files.push_back(deps[i].ptr->dependency_output_file());
+
+ WriteStampForTarget(output_files, data_output_files);
}
« no previous file with comments | « tools/gn/ninja_group_target_writer.h ('k') | tools/gn/ninja_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698