diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-11-01 13:00:16 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-11-01 13:00:16 +0200 |
commit | eacf7f7ccd40a56d1fe761d3d30ced6c6acd58da (patch) | |
tree | 841a87d57720704654e8e8fa94cecd05c17b6cfa /build2/algorithm.cxx | |
parent | 8ba507252cb932023d16e5d4dfef267c039feb78 (diff) |
Add support for rule-specific variables, use to fix cc.type data race
Diffstat (limited to 'build2/algorithm.cxx')
-rw-r--r-- | build2/algorithm.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/build2/algorithm.cxx b/build2/algorithm.cxx index fbeb365..b4f2843 100644 --- a/build2/algorithm.cxx +++ b/build2/algorithm.cxx @@ -434,11 +434,12 @@ namespace build2 // Match. // - // Clear the resolved targets list and the data pad before calling - // match(). The rule is free to modify these in its match() - // (provided that it matches) in order to, for example, convey some - // information to apply(). + // Clear the rule-specific variables, resolved targets list, and the + // data pad before calling match(). The rule is free to modify these + // in its match() (provided that it matches) in order to, for + // example, convey some information to apply(). // + s.vars.clear (); t.prerequisite_targets[a].clear (); if (a.inner ()) t.clear_data (); @@ -479,6 +480,7 @@ namespace build2 // As a sanity measure clear the target data since it can be incomplete // or invalid (mark()/unmark() should give you some ideas). // + s.vars.clear (); t.prerequisite_targets[a].clear (); if (a.inner ()) t.clear_data (); |