aboutsummaryrefslogtreecommitdiff
path: root/build2/cc
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-01-23 10:53:33 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-01-23 10:53:33 +0200
commit1c7d67d9895c2bdbef13541b154ea17d25b8d515 (patch)
treeac06cf710a0104c51fdb4c4c47db3e245ac2c793 /build2/cc
parent91495e646c688eade6b46f21bb40e3da8b8d6f1a (diff)
Go back to storing scope instead of target in prerequisite
Turns out this was semantically the right way to do it.
Diffstat (limited to 'build2/cc')
-rw-r--r--build2/cc/link.cxx8
1 files changed, 4 insertions, 4 deletions
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<lib> () || p.is_a<liba> () || p.is_a<libs> ())
- ot.prerequisites.emplace_back (p, ot);
+ ot.prerequisites.emplace_back (p);
}
build2::match (a, *pt);