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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 pair.ptr->recursive_hard_deps().end()); | 508 pair.ptr->recursive_hard_deps().end()); |
509 } | 509 } |
510 } | 510 } |
511 | 511 |
512 void Target::PullRecursiveBundleData() { | 512 void Target::PullRecursiveBundleData() { |
513 for (const auto& pair : GetDeps(DEPS_LINKED)) { | 513 for (const auto& pair : GetDeps(DEPS_LINKED)) { |
514 // Don't propagate bundle_data once they are added to a bundle. | 514 // Don't propagate bundle_data once they are added to a bundle. |
515 if (pair.ptr->output_type() == CREATE_BUNDLE) | 515 if (pair.ptr->output_type() == CREATE_BUNDLE) |
516 continue; | 516 continue; |
517 | 517 |
| 518 // Don't propagate across toolchain. |
| 519 if (pair.ptr->toolchain() != toolchain()) |
| 520 continue; |
| 521 |
518 // Direct dependency on a bundle_data target. | 522 // Direct dependency on a bundle_data target. |
519 if (pair.ptr->output_type() == BUNDLE_DATA) | 523 if (pair.ptr->output_type() == BUNDLE_DATA) |
520 bundle_data_.AddBundleData(pair.ptr); | 524 bundle_data_.AddBundleData(pair.ptr); |
521 | 525 |
522 // Recursive bundle_data informations from all dependencies. | 526 // Recursive bundle_data informations from all dependencies. |
523 for (const auto& target : pair.ptr->bundle_data().bundle_deps()) | 527 for (const auto& target : pair.ptr->bundle_data().bundle_deps()) |
524 bundle_data_.AddBundleData(target); | 528 bundle_data_.AddBundleData(target); |
525 } | 529 } |
526 | 530 |
527 bundle_data_.OnTargetResolved(this); | 531 bundle_data_.OnTargetResolved(this); |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 check_data_deps = g_scheduler->IsFileGeneratedByWriteRuntimeDeps(out_file); | 763 check_data_deps = g_scheduler->IsFileGeneratedByWriteRuntimeDeps(out_file); |
760 // 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" |
761 // output check failed. | 765 // output check failed. |
762 consider_object_files = !check_data_deps; | 766 consider_object_files = !check_data_deps; |
763 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, | 767 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, |
764 consider_object_files, | 768 consider_object_files, |
765 check_data_deps, &seen_targets)) | 769 check_data_deps, &seen_targets)) |
766 g_scheduler->AddUnknownGeneratedInput(this, source); | 770 g_scheduler->AddUnknownGeneratedInput(this, source); |
767 } | 771 } |
768 } | 772 } |
OLD | NEW |