aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/algorithm.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/algorithm.hxx')
-rw-r--r--libbuild2/algorithm.hxx8
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,