| 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/target.h" | 5 #include "tools/gn/target.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 // Only check private deps if requested. | 122 // Only check private deps if requested. |
| 123 if (check_private_deps) { | 123 if (check_private_deps) { |
| 124 for (const auto& pair : target->private_deps()) { | 124 for (const auto& pair : target->private_deps()) { |
| 125 if (EnsureFileIsGeneratedByDependency(pair.ptr, file, false, | 125 if (EnsureFileIsGeneratedByDependency(pair.ptr, file, false, |
| 126 consider_object_files, | 126 consider_object_files, |
| 127 check_data_deps, seen_targets)) | 127 check_data_deps, seen_targets)) |
| 128 return true; // Found a path. | 128 return true; // Found a path. |
| 129 } | 129 } |
| 130 if (target->output_type() == Target::CREATE_BUNDLE) { | 130 if (target->output_type() == Target::CREATE_BUNDLE) { |
| 131 for (const auto& dep : target->bundle_data().bundle_deps()) { | 131 for (auto* dep : target->bundle_data().bundle_deps()) { |
| 132 if (EnsureFileIsGeneratedByDependency(dep, file, false, | 132 if (EnsureFileIsGeneratedByDependency(dep, file, false, |
| 133 consider_object_files, | 133 consider_object_files, |
| 134 check_data_deps, seen_targets)) | 134 check_data_deps, seen_targets)) |
| 135 return true; // Found a path. | 135 return true; // Found a path. |
| 136 } | 136 } |
| 137 } | 137 } |
| 138 } | 138 } |
| 139 return false; | 139 return false; |
| 140 } | 140 } |
| 141 | 141 |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 | 517 |
| 518 // Don't propagate across toolchain. | 518 // Don't propagate across toolchain. |
| 519 if (pair.ptr->toolchain() != toolchain()) | 519 if (pair.ptr->toolchain() != toolchain()) |
| 520 continue; | 520 continue; |
| 521 | 521 |
| 522 // Direct dependency on a bundle_data target. | 522 // Direct dependency on a bundle_data target. |
| 523 if (pair.ptr->output_type() == BUNDLE_DATA) | 523 if (pair.ptr->output_type() == BUNDLE_DATA) |
| 524 bundle_data_.AddBundleData(pair.ptr); | 524 bundle_data_.AddBundleData(pair.ptr); |
| 525 | 525 |
| 526 // Recursive bundle_data informations from all dependencies. | 526 // Recursive bundle_data informations from all dependencies. |
| 527 for (const auto& target : pair.ptr->bundle_data().bundle_deps()) | 527 for (auto* target : pair.ptr->bundle_data().bundle_deps()) |
| 528 bundle_data_.AddBundleData(target); | 528 bundle_data_.AddBundleData(target); |
| 529 } | 529 } |
| 530 | 530 |
| 531 bundle_data_.OnTargetResolved(this); | 531 bundle_data_.OnTargetResolved(this); |
| 532 } | 532 } |
| 533 | 533 |
| 534 void Target::FillOutputFiles() { | 534 void Target::FillOutputFiles() { |
| 535 const Tool* tool = toolchain_->GetToolForTargetFinalOutput(this); | 535 const Tool* tool = toolchain_->GetToolForTargetFinalOutput(this); |
| 536 bool check_tool_outputs = false; | 536 bool check_tool_outputs = false; |
| 537 switch (output_type_) { | 537 switch (output_type_) { |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 check_data_deps = g_scheduler->IsFileGeneratedByWriteRuntimeDeps(out_file); | 763 check_data_deps = g_scheduler->IsFileGeneratedByWriteRuntimeDeps(out_file); |
| 764 // Check object files (much slower and very rare) only if the "normal" | 764 // Check object files (much slower and very rare) only if the "normal" |
| 765 // output check failed. | 765 // output check failed. |
| 766 consider_object_files = !check_data_deps; | 766 consider_object_files = !check_data_deps; |
| 767 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, | 767 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, |
| 768 consider_object_files, | 768 consider_object_files, |
| 769 check_data_deps, &seen_targets)) | 769 check_data_deps, &seen_targets)) |
| 770 g_scheduler->AddUnknownGeneratedInput(this, source); | 770 g_scheduler->AddUnknownGeneratedInput(this, source); |
| 771 } | 771 } |
| 772 } | 772 } |
| OLD | NEW |