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

Side by Side Diff: trunk/src/tools/gn/ninja_group_target_writer.cc

Issue 46313006: Revert 232657 "GN: toolchain threading cleanup" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « trunk/src/tools/gn/ninja_group_target_writer.h ('k') | trunk/src/tools/gn/ninja_helper.h » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_group_target_writer.h" 5 #include "tools/gn/ninja_group_target_writer.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "tools/gn/string_utils.h" 8 #include "tools/gn/string_utils.h"
9 9
10 NinjaGroupTargetWriter::NinjaGroupTargetWriter(const Target* target, 10 NinjaGroupTargetWriter::NinjaGroupTargetWriter(const Target* target,
11 const Toolchain* toolchain,
12 std::ostream& out) 11 std::ostream& out)
13 : NinjaTargetWriter(target, toolchain, out) { 12 : NinjaTargetWriter(target, out) {
14 } 13 }
15 14
16 NinjaGroupTargetWriter::~NinjaGroupTargetWriter() { 15 NinjaGroupTargetWriter::~NinjaGroupTargetWriter() {
17 } 16 }
18 17
19 void NinjaGroupTargetWriter::Run() { 18 void NinjaGroupTargetWriter::Run() {
20 // A group rule just generates a stamp file with dependencies on each of 19 // A group rule just generates a stamp file with dependencies on each of
21 // the deps in the group. 20 // the deps in the group.
22 out_ << std::endl << "build "; 21 out_ << std::endl << "build ";
23 path_output_.WriteFile(out_, helper_.GetTargetOutputFile(target_)); 22 path_output_.WriteFile(out_, helper_.GetTargetOutputFile(target_));
24 out_ << ": " 23 out_ << ": "
25 << helper_.GetRulePrefix(target_->settings()) 24 << helper_.GetRulePrefix(target_->settings()->toolchain())
26 << "stamp"; 25 << "stamp";
27 26
28 const LabelTargetVector& deps = target_->deps(); 27 const LabelTargetVector& deps = target_->deps();
29 for (size_t i = 0; i < deps.size(); i++) { 28 for (size_t i = 0; i < deps.size(); i++) {
30 out_ << " "; 29 out_ << " ";
31 path_output_.WriteFile(out_, helper_.GetTargetOutputFile(deps[i].ptr)); 30 path_output_.WriteFile(out_, helper_.GetTargetOutputFile(deps[i].ptr));
32 } 31 }
33 32
34 const LabelTargetVector& datadeps = target_->datadeps(); 33 const LabelTargetVector& datadeps = target_->datadeps();
35 for (size_t i = 0; i < datadeps.size(); i++) { 34 for (size_t i = 0; i < datadeps.size(); i++) {
36 out_ << " "; 35 out_ << " ";
37 path_output_.WriteFile(out_, helper_.GetTargetOutputFile(datadeps[i].ptr)); 36 path_output_.WriteFile(out_, helper_.GetTargetOutputFile(datadeps[i].ptr));
38 } 37 }
39 out_ << std::endl; 38 out_ << std::endl;
40 } 39 }
OLDNEW
« no previous file with comments | « trunk/src/tools/gn/ninja_group_target_writer.h ('k') | trunk/src/tools/gn/ninja_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698