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

Side by Side Diff: tools/gn/ninja_action_target_writer.cc

Issue 1358803002: Add ninja console pool support to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update action/action_foreach doc Created 5 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 unified diff | Download patch
« no previous file with comments | « tools/gn/functions_target.cc ('k') | tools/gn/ninja_action_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 (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_action_target_writer.h" 5 #include "tools/gn/ninja_action_target_writer.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "tools/gn/deps_iterator.h" 8 #include "tools/gn/deps_iterator.h"
9 #include "tools/gn/err.h" 9 #include "tools/gn/err.h"
10 #include "tools/gn/settings.h" 10 #include "tools/gn/settings.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // time any of its dependencies change. 67 // time any of its dependencies change.
68 out_ << " | "; 68 out_ << " | ";
69 path_output_.WriteFile(out_, input_dep); 69 path_output_.WriteFile(out_, input_dep);
70 } 70 }
71 out_ << std::endl; 71 out_ << std::endl;
72 if (target_->action_values().has_depfile()) { 72 if (target_->action_values().has_depfile()) {
73 out_ << " depfile = "; 73 out_ << " depfile = ";
74 WriteDepfile(SourceFile()); 74 WriteDepfile(SourceFile());
75 out_ << std::endl; 75 out_ << std::endl;
76 } 76 }
77 if (target_->action_values().is_console()) {
78 out_ << " pool = console";
79 out_ << std::endl;
80 }
77 } 81 }
78 out_ << std::endl; 82 out_ << std::endl;
79 83
80 // Write the stamp, which also depends on all data deps. These are needed at 84 // Write the stamp, which also depends on all data deps. These are needed at
81 // runtime and should be compiled when the action is, but don't need to be 85 // runtime and should be compiled when the action is, but don't need to be
82 // done before we run the action. 86 // done before we run the action.
83 std::vector<OutputFile> data_outs; 87 std::vector<OutputFile> data_outs;
84 for (const auto& dep : target_->data_deps()) 88 for (const auto& dep : target_->data_deps())
85 data_outs.push_back(dep.ptr->dependency_output_file()); 89 data_outs.push_back(dep.ptr->dependency_output_file());
86 WriteStampForTarget(output_files, data_outs); 90 WriteStampForTarget(output_files, data_outs);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 out_ << " "; 213 out_ << " ";
210 path_output_.WriteFile(out_, (*output_files)[i]); 214 path_output_.WriteFile(out_, (*output_files)[i]);
211 } 215 }
212 } 216 }
213 217
214 void NinjaActionTargetWriter::WriteDepfile(const SourceFile& source) { 218 void NinjaActionTargetWriter::WriteDepfile(const SourceFile& source) {
215 path_output_.WriteFile(out_, 219 path_output_.WriteFile(out_,
216 SubstitutionWriter::ApplyPatternToSourceAsOutputFile( 220 SubstitutionWriter::ApplyPatternToSourceAsOutputFile(
217 settings_, target_->action_values().depfile(), source)); 221 settings_, target_->action_values().depfile(), source));
218 } 222 }
OLDNEW
« no previous file with comments | « tools/gn/functions_target.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