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

Unified Diff: tools/gn/builder.cc

Issue 1375023003: tools/gn: Remove code for forward_dependent_configs_from variable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: forward_dependent_configs Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: tools/gn/builder.cc
diff --git a/tools/gn/builder.cc b/tools/gn/builder.cc
index ca11e888d353bd3d6c5168afe09580103711fab8..5548d2b4082c0d0dcfadf157fec8f8a318f5cf60 100644
--- a/tools/gn/builder.cc
+++ b/tools/gn/builder.cc
@@ -416,7 +416,6 @@ bool Builder::ResolveItem(BuilderRecord* record, Err* err) {
!ResolveConfigs(&target->configs(), err) ||
!ResolveConfigs(&target->all_dependent_configs(), err) ||
!ResolveConfigs(&target->public_configs(), err) ||
- !ResolveForwardDependentConfigs(target, err) ||
!ResolveToolchain(target, err))
return false;
} else if (record->type() == BuilderRecord::ITEM_CONFIG) {
@@ -477,37 +476,6 @@ bool Builder::ResolveConfigs(UniqueVector<LabelConfigPair>* configs, Err* err) {
return true;
}
-// "Forward dependent configs" should refer to targets in the deps that should
-// have their configs forwarded.
-bool Builder::ResolveForwardDependentConfigs(Target* target, Err* err) {
- const UniqueVector<LabelTargetPair>& configs =
- target->forward_dependent_configs();
-
- // Assume that the lists are small so that brute-force n^2 is appropriate.
- for (const auto& config : configs) {
- for (const auto& dep_pair : target->GetDeps(Target::DEPS_LINKED)) {
- if (config.label == dep_pair.label) {
- DCHECK(dep_pair.ptr); // Should already be resolved.
- // UniqueVector's contents are constant so uniqueness is preserved, but
- // we want to update this pointer which doesn't change uniqueness
- // (uniqueness in this vector is determined by the label only).
- const_cast<LabelTargetPair&>(config).ptr = dep_pair.ptr;
- break;
- }
- }
- if (!config.ptr) {
- *err = Err(target->defined_from(),
- "Target in forward_dependent_configs_from was not listed in the deps",
- "This target has a forward_dependent_configs_from entry that was "
- "not present in\nthe deps. A target can only forward things it "
- "depends on. It was forwarding:\n " +
- config.label.GetUserVisibleName(false));
- return false;
- }
- }
- return true;
-}
-
bool Builder::ResolveToolchain(Target* target, Err* err) {
BuilderRecord* record = GetResolvedRecordOfType(
target->settings()->toolchain_label(), target->defined_from(),
« no previous file with comments | « tools/gn/builder.h ('k') | tools/gn/command_desc.cc » ('j') | tools/gn/target_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698