diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-10-26 09:42:04 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-10-26 13:29:25 +0200 |
commit | 37cccafddbaeb3661998125ef41775ba974ed149 (patch) | |
tree | fd1814dd61e2a17d0aa40c87ac4741eb104701f3 /libbuild2/algorithm.hxx | |
parent | 185afee482b707a49c445a5d001dd20c31f1aa75 (diff) |
WIP: fixes for match options
Diffstat (limited to 'libbuild2/algorithm.hxx')
-rw-r--r-- | libbuild2/algorithm.hxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libbuild2/algorithm.hxx b/libbuild2/algorithm.hxx index 5ebbae2..19f7db2 100644 --- a/libbuild2/algorithm.hxx +++ b/libbuild2/algorithm.hxx @@ -363,7 +363,7 @@ namespace build2 // to be unchanged after match. If it is unmatch::safe, then unmatch the // target if it is safe (this includes unchanged or if we know that someone // else will execute this target). Return true in first half of the pair if - // unmatch succeeded. Always throw if failed. Note that unmatching doesn't + // unmatch succeeded. Always throw if failed. Note that unmatching may not // play well with options -- if unmatch succeeds, the options that have been // passed to match will not be cleared. // @@ -489,6 +489,12 @@ namespace build2 // of the match_*() functions. Note that natually you cannot rematch a // target that you have unmatched. // + // Note also that there is no way to check if the rematch is unnecessary + // (i.e., because the target is already matched with this option) because + // that would require MT-safety considerations (since there could be a + // concurrent rematch). Instead, you should rematch unconditionally and if + // the option is already present, it will be a cheap noop. + // target_state rematch_sync (action, const target&, uint64_t options, |