aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/adhoc-rule-buildscript.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-09-21 14:18:03 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-09-21 14:18:03 +0200
commitfb5c711d0a2ccac1bc014a9a8580e85753e4067b (patch)
tree30a01c753257f2197ea2edc6d8e53ad202ce371a /libbuild2/adhoc-rule-buildscript.cxx
parentfcb9dc3382f300e72303280fbcebf7b829b3372f (diff)
Fix regression in dynamic dependency extraction, byproduct mode
Diffstat (limited to 'libbuild2/adhoc-rule-buildscript.cxx')
-rw-r--r--libbuild2/adhoc-rule-buildscript.cxx10
1 files changed, 10 insertions, 0 deletions
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