From 28055d044d0c21ff5556de52c3e273d5f4969408 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 29 Jul 2017 14:15:41 +0200 Subject: Create libu{} and obj{} groups even if they don't exist Failed that target-type/pattern-specific variables for groups may not have effect. --- build2/cc/compile.cxx | 7 +++---- build2/cc/link.cxx | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx index 62be69a..6c3cc4c 100644 --- a/build2/cc/compile.cxx +++ b/build2/cc/compile.cxx @@ -220,10 +220,9 @@ namespace build2 // which means this can be done whether we match or not). // if (t.group == nullptr) - { - const target_type& tt (mod ? bmi::static_type : obj::static_type); - t.group = targets.find (tt, t.dir, t.out, t.name); - } + t.group = &search (t, + mod ? bmi::static_type : obj::static_type, + t.dir, t.out, t.name); // See if we have a source file. Iterate in reverse so that a source // file specified for a member overrides the one specified for the diff --git a/build2/cc/link.cxx b/build2/cc/link.cxx index 25b6a28..1cb3a11 100644 --- a/build2/cc/link.cxx +++ b/build2/cc/link.cxx @@ -65,9 +65,9 @@ namespace build2 if (lt.library ()) { if (t.group == nullptr) - t.group = targets.find ( - lt.utility ? libu::static_type : lib::static_type, - t.dir, t.out, t.name); + t.group = &search (t, + lt.utility ? libu::static_type : lib::static_type, + t.dir, t.out, t.name); } // Scan prerequisites and see if we can work with what we've got. Note -- cgit v1.1