aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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