aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/cc')
-rw-r--r--libbuild2/cc/link-rule.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/libbuild2/cc/link-rule.cxx b/libbuild2/cc/link-rule.cxx
index 05a4da8..0482fcb 100644
--- a/libbuild2/cc/link-rule.cxx
+++ b/libbuild2/cc/link-rule.cxx
@@ -1522,12 +1522,14 @@ namespace build2
if (!l.defined ())
{
- bool g (pt->group != nullptr);
+ const target* g (pt->group);
+
+ target_key tk (pt->key ());
+ target_key gk (g != nullptr ? g->key () : target_key {});
+
l = bs.lookup_original (var,
- &pt->type (),
- &pt->name,
- (g ? &pt->group->type () : nullptr),
- (g ? &pt->group->name : nullptr)).first;
+ &tk,
+ g != nullptr ? &gk : nullptr).first;
}
if (l ? cast<bool> (*l) : u)