From c2001eb367b9b82e26689cad6f1f74f46c72b904 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 27 Apr 2017 08:29:52 +0200 Subject: Pass target to prerequisite search --- build2/cc/compile.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'build2/cc/compile.cxx') diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx index 67d254b..c5ef480 100644 --- a/build2/cc/compile.cxx +++ b/build2/cc/compile.cxx @@ -321,7 +321,7 @@ namespace build2 continue; } - pt = &p.search (); + pt = &p.search (t); if (const lib* l = pt->is_a ()) pt = &link_member (*l, act, lo); @@ -331,7 +331,7 @@ namespace build2 } else { - pt = &p.search (); + pt = &p.search (t); if (act.operation () == clean_id && !pt->dir.sub (rs.out_path ())) continue; @@ -375,7 +375,7 @@ namespace build2 // t.prerequisite_targets since we used standard search() and match() // above. // - const file& src (*md.src.search ().is_a ()); + const file& src (*md.src.search (t).is_a ()); // Make sure the output directory exists. // @@ -993,12 +993,12 @@ namespace build2 // from the depdb cache or from the compiler run. Return whether the // extraction process should be restarted. // - auto add = [&trace, &update, &pm, act, &t, lo, &dd, &bs, this] + auto add = [&trace, &update, &pm, act, &t, lo, &dd, &bs, &t, this] (path f, bool cache) -> bool { // Find or maybe insert the target. // - auto find = [&trace, this] ( + auto find = [&trace, &t, this] ( const path& f, bool insert) -> const path_target* { // Split the name into its directory part, the name part, and @@ -1059,7 +1059,7 @@ namespace build2 // const target* r; if (insert) - r = &search (*tt, d, out, n, &e, nullptr); + r = &search (t, *tt, d, out, n, &e, nullptr); else { // Note that we skip any target type-specific searches (like for -- cgit v1.1