aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-07-29 14:15:41 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-07-29 14:15:41 +0200
commit28055d044d0c21ff5556de52c3e273d5f4969408 (patch)
tree56b1ccef2f61d9b8781f1838165cfa217b795f54
parent682836daacdd3dc486187c9d60479b372895a470 (diff)
Create libu{} and obj{} groups even if they don't exist
Failed that target-type/pattern-specific variables for groups may not have effect.
-rw-r--r--build2/cc/compile.cxx7
-rw-r--r--build2/cc/link.cxx6
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