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

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

Issue 265703008: Support deps for actions in GN. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « tools/gn/ninja_action_target_writer_unittest.cc ('k') | tools/gn/ninja_target_writer.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_binary_target_writer.h" 5 #include "tools/gn/ninja_binary_target_writer.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "tools/gn/config_values_extractors.h" 10 #include "tools/gn/config_values_extractors.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 #undef WRITE_FLAGS 139 #undef WRITE_FLAGS
140 140
141 out_ << std::endl; 141 out_ << std::endl;
142 } 142 }
143 143
144 void NinjaBinaryTargetWriter::WriteSources( 144 void NinjaBinaryTargetWriter::WriteSources(
145 std::vector<OutputFile>* object_files) { 145 std::vector<OutputFile>* object_files) {
146 const Target::FileList& sources = target_->sources(); 146 const Target::FileList& sources = target_->sources();
147 object_files->reserve(sources.size()); 147 object_files->reserve(sources.size());
148 148
149 std::string implicit_deps = WriteInputDepsStampAndGetDep(); 149 std::string implicit_deps =
150 WriteInputDepsStampAndGetDep(std::vector<const Target*>());
150 151
151 for (size_t i = 0; i < sources.size(); i++) { 152 for (size_t i = 0; i < sources.size(); i++) {
152 const SourceFile& input_file = sources[i]; 153 const SourceFile& input_file = sources[i];
153 154
154 SourceFileType input_file_type = GetSourceFileType(input_file); 155 SourceFileType input_file_type = GetSourceFileType(input_file);
155 if (input_file_type == SOURCE_UNKNOWN) 156 if (input_file_type == SOURCE_UNKNOWN)
156 continue; // Skip unknown file types. 157 continue; // Skip unknown file types.
157 std::string command = 158 std::string command =
158 helper_.GetRuleForSourceType(settings_, input_file_type); 159 helper_.GetRuleForSourceType(settings_, input_file_type);
159 if (command.empty()) 160 if (command.empty())
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 } 460 }
460 461
461 // Data files. 462 // Data files.
462 const std::vector<SourceFile>& data = target_->data(); 463 const std::vector<SourceFile>& data = target_->data();
463 for (size_t i = 0; i < data.size(); i++) { 464 for (size_t i = 0; i < data.size(); i++) {
464 out_ << " "; 465 out_ << " ";
465 path_output_.WriteFile(out_, data[i]); 466 path_output_.WriteFile(out_, data[i]);
466 } 467 }
467 } 468 }
468 } 469 }
OLDNEW
« no previous file with comments | « tools/gn/ninja_action_target_writer_unittest.cc ('k') | tools/gn/ninja_target_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698