aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/install-rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-02-16 11:30:41 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-02-16 11:30:41 +0200
commit63d1d6f8f4bb6db482b21e728245ebf9eee6b55f (patch)
tree61f1b519a447fd2b96c877bfced4b9fc8363824e /build2/cc/install-rule.cxx
parentef12b3bf80e2eec3fcfd36cceee02f357a992039 (diff)
Fix group link-up race
Diffstat (limited to 'build2/cc/install-rule.cxx')
-rw-r--r--build2/cc/install-rule.cxx18
1 files changed, 13 insertions, 5 deletions
diff --git a/build2/cc/install-rule.cxx b/build2/cc/install-rule.cxx
index 0fdb98b..e74104c 100644
--- a/build2/cc/install-rule.cxx
+++ b/build2/cc/install-rule.cxx
@@ -107,14 +107,18 @@ namespace build2
//
// Note: for now we assume bmi*{} never come from see-through groups.
//
- if (p.is_a<bmi> () || p.is_a (compile_types (ot).bmi))
+ bool g (false);
+ if (p.is_a<bmi> () || (g = p.is_a (compile_types (ot).bmi)))
{
- // This is tricky: we need to "look" inside groups for mxx{} but if
- // found, remap to the group, not member.
- //
+ if (g)
+ resolve_group (a, *pt);
+
for (prerequisite_member pm:
group_prerequisite_members (a, *pt, members_mode::maybe))
{
+ // This is tricky: we need to "look" inside groups for mxx{} but if
+ // found, remap to the group, not member.
+ //
if (pm.is_a (*x_mod))
{
pt = t.is_a<exe> ()
@@ -304,8 +308,12 @@ namespace build2
return pt;
}
- if (p.is_a<bmi> () || p.is_a (compile_types (ot).bmi))
+ bool g (false);
+ if (p.is_a<bmi> () || (g = p.is_a (compile_types (ot).bmi)))
{
+ if (g)
+ resolve_group (a, *pt);
+
for (prerequisite_member pm:
group_prerequisite_members (a, *pt, members_mode::maybe))
{