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

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

Issue 2121793003: Stop recursion for create_bundle deps when crossing toolchain. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | 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/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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698