From fb5c711d0a2ccac1bc014a9a8580e85753e4067b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 21 Sep 2022 14:18:03 +0200 Subject: Fix regression in dynamic dependency extraction, byproduct mode --- libbuild2/adhoc-rule-buildscript.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libbuild2/adhoc-rule-buildscript.cxx') diff --git a/libbuild2/adhoc-rule-buildscript.cxx b/libbuild2/adhoc-rule-buildscript.cxx index c5eaa60..505be1b 100644 --- a/libbuild2/adhoc-rule-buildscript.cxx +++ b/libbuild2/adhoc-rule-buildscript.cxx @@ -949,10 +949,20 @@ namespace build2 { normalize_external (fp, what); + // Note that unless we take into account dynamic targets, the skip + // logic below falls apart since we neither see targets entered via + // prerequsites (skip static prerequisites) nor by the cache=true code + // above (skip depdb entries). + // + // If this turns out to be racy (which is the reason we would skip + // dynamic targets; see the fine_file() implementation for details), + // then the only answer for now is to not use the byproduct mode. + // if (const build2::file* ft = dyndep::find_file ( trace, what, a, bs, t, fp, false /* cache */, true /* normalized */, + true /* dynamic */, map_ext, *byp.default_type).first) { // Skip if this is one of the static prerequisites provided it was -- cgit v1.1