From 63d1d6f8f4bb6db482b21e728245ebf9eee6b55f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 16 Feb 2018 11:30:41 +0200 Subject: Fix group link-up race --- build2/cc/install-rule.cxx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'build2/cc/install-rule.cxx') 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 () || p.is_a (compile_types (ot).bmi)) + bool g (false); + if (p.is_a () || (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 () @@ -304,8 +308,12 @@ namespace build2 return pt; } - if (p.is_a () || p.is_a (compile_types (ot).bmi)) + bool g (false); + if (p.is_a () || (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)) { -- cgit v1.1