aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/link-rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-03-08 10:57:52 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-03-08 10:59:20 +0200
commit2ede341d59b4ab259caf808dfa65c0ac380ba347 (patch)
treea69e7b9f6a943692cc81b22cd98c8df97c1e9e19 /libbuild2/cc/link-rule.cxx
parentc5022fa04b64a9b572cd468837b934eaf5999e1a (diff)
Improve performance of update during match for multiple targets
Diffstat (limited to 'libbuild2/cc/link-rule.cxx')
-rw-r--r--libbuild2/cc/link-rule.cxx14
1 files changed, 5 insertions, 9 deletions
diff --git a/libbuild2/cc/link-rule.cxx b/libbuild2/cc/link-rule.cxx
index c507155..b72e5a0 100644
--- a/libbuild2/cc/link-rule.cxx
+++ b/libbuild2/cc/link-rule.cxx
@@ -1226,17 +1226,13 @@ namespace build2
// example, object file matches may need the headers to be already
// updated).
//
- // Note also that we ignore the result and whether it renders us out of
- // date, leaving it to the common execute logic in perform_update().
+ // Note that we ignore the result and whether it renders us out of date,
+ // leaving it to the common execute logic in perform_update().
+ //
+ // Note also that update_during_match() spoils prerequisite_target::data.
//
if (update_match)
- {
- for (const prerequisite_target& pto: pts)
- {
- if ((pto.include & 2) != 0)
- update_during_match (trace, a, *pto.target);
- }
- }
+ update_during_match (trace, a, pts, 2 /* mask */);
// Check if we have any binful utility libraries.
//