From 1c7d67d9895c2bdbef13541b154ea17d25b8d515 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 23 Jan 2017 10:53:33 +0200 Subject: Go back to storing scope instead of target in prerequisite Turns out this was semantically the right way to do it. --- build2/cc/link.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'build2/cc') diff --git a/build2/cc/link.cxx b/build2/cc/link.cxx index a8b7dcb..c94eb26 100644 --- a/build2/cc/link.cxx +++ b/build2/cc/link.cxx @@ -165,7 +165,7 @@ namespace build2 // If the prerequisite came from the lib{} group, then also // add it to lib's prerequisite_targets. // - if (p.prerequisite.owner != t) + if (!p.prerequisite.belongs (t)) t.group->prerequisite_targets.push_back (pt); t.prerequisite_targets.push_back (pt); @@ -487,7 +487,7 @@ namespace build2 // @@ Why are we creating the obj{} group if the source came from a // group? // - bool group (p.prerequisite.owner != t); // Group's prerequisite. + bool group (!p.prerequisite.belongs (t)); // Group's prerequisite. const prerequisite_key& cp (p.key ()); // C-source (X or C) key. const target_type& tt (group ? obj::static_type : ott); @@ -614,7 +614,7 @@ namespace build2 { // Note: add the source to the group, not the member. // - ot.prerequisites.push_back (p.as_prerequisite_for (ot)); + ot.prerequisites.push_back (p.as_prerequisite ()); // Add our lib*{} prerequisites to the object file (see the export.* // machinery for details). @@ -634,7 +634,7 @@ namespace build2 for (prerequisite& p: group_prerequisites (t)) { if (p.is_a () || p.is_a () || p.is_a ()) - ot.prerequisites.emplace_back (p, ot); + ot.prerequisites.emplace_back (p); } build2::match (a, *pt); -- cgit v1.1