| 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 #include <sstream> | 8 #include <sstream> |
| 9 | 9 |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 UniqueVector<OutputFile>* extra_object_files, | 376 UniqueVector<OutputFile>* extra_object_files, |
| 377 UniqueVector<const Target*>* linkable_deps, | 377 UniqueVector<const Target*>* linkable_deps, |
| 378 UniqueVector<const Target*>* non_linkable_deps) const { | 378 UniqueVector<const Target*>* non_linkable_deps) const { |
| 379 // Normal public/private deps. | 379 // Normal public/private deps. |
| 380 for (const auto& pair : target_->GetDeps(Target::DEPS_LINKED)) { | 380 for (const auto& pair : target_->GetDeps(Target::DEPS_LINKED)) { |
| 381 ClassifyDependency(pair.ptr, extra_object_files, | 381 ClassifyDependency(pair.ptr, extra_object_files, |
| 382 linkable_deps, non_linkable_deps); | 382 linkable_deps, non_linkable_deps); |
| 383 } | 383 } |
| 384 | 384 |
| 385 // Inherited libraries. | 385 // Inherited libraries. |
| 386 for (const auto& inherited_target : target_->inherited_libraries()) { | 386 for (const auto& inherited_target : |
| 387 target_->inherited_libraries().GetOrdered()) { |
| 387 ClassifyDependency(inherited_target, extra_object_files, | 388 ClassifyDependency(inherited_target, extra_object_files, |
| 388 linkable_deps, non_linkable_deps); | 389 linkable_deps, non_linkable_deps); |
| 389 } | 390 } |
| 390 | 391 |
| 391 // Data deps. | 392 // Data deps. |
| 392 for (const auto& data_dep_pair : target_->data_deps()) | 393 for (const auto& data_dep_pair : target_->data_deps()) |
| 393 non_linkable_deps->push_back(data_dep_pair.ptr); | 394 non_linkable_deps->push_back(data_dep_pair.ptr); |
| 394 } | 395 } |
| 395 | 396 |
| 396 void NinjaBinaryTargetWriter::ClassifyDependency( | 397 void NinjaBinaryTargetWriter::ClassifyDependency( |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 return false; // No tool for this file (it's a header file or something). | 472 return false; // No tool for this file (it's a header file or something). |
| 472 const Tool* tool = target->toolchain()->GetTool(*computed_tool_type); | 473 const Tool* tool = target->toolchain()->GetTool(*computed_tool_type); |
| 473 if (!tool) | 474 if (!tool) |
| 474 return false; // Tool does not apply for this toolchain.file. | 475 return false; // Tool does not apply for this toolchain.file. |
| 475 | 476 |
| 476 // Figure out what output(s) this compiler produces. | 477 // Figure out what output(s) this compiler produces. |
| 477 SubstitutionWriter::ApplyListToCompilerAsOutputFile( | 478 SubstitutionWriter::ApplyListToCompilerAsOutputFile( |
| 478 target, source, tool->outputs(), outputs); | 479 target, source, tool->outputs(), outputs); |
| 479 return !outputs->empty(); | 480 return !outputs->empty(); |
| 480 } | 481 } |
| OLD | NEW |