| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |