aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-09-05 09:41:00 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-09-05 09:41:00 +0200
commitcedf1eb8d6aa33c6bdf3c7d65095f08dc2e9d81e (patch)
treea4976d15f3b17709d4de6e2a1d09f838eb080c42
parentab1458851bc08438fb7cf8f3f015ef6c2707edc3 (diff)
Fix bug in whole archive prerequisite change tracking
-rw-r--r--libbuild2/cc/link-rule.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/libbuild2/cc/link-rule.cxx b/libbuild2/cc/link-rule.cxx
index eb44142..d9fbbea 100644
--- a/libbuild2/cc/link-rule.cxx
+++ b/libbuild2/cc/link-rule.cxx
@@ -2720,13 +2720,13 @@ namespace build2
else
{
d.args.push_back ("-Wl,--whole-archive");
- d.args.push_back (move (p));
+ d.args.push_back (move (p)); p.clear ();
d.args.push_back ("-Wl,--no-whole-archive");
- goto done;
}
}
- d.args.push_back (move (p));
+ if (!p.empty ())
+ d.args.push_back (move (p));
}
if (d.cs != nullptr)