aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-05-24 10:50:28 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-05-28 10:10:44 +0200
commit726aaab07a785b904dd1265bffa603bdd2a7665b (patch)
treeec28756d501ef3411b02a10a24dde76535e6581c /libbuild2/cc
parente1f472e471533330db05a42d5bcd4e99b211da0c (diff)
Tie loose ends in target type/pattern-specific matching
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)