diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2024-09-05 09:41:00 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2024-09-05 09:41:00 +0200 |
commit | cedf1eb8d6aa33c6bdf3c7d65095f08dc2e9d81e (patch) | |
tree | a4976d15f3b17709d4de6e2a1d09f838eb080c42 | |
parent | ab1458851bc08438fb7cf8f3f015ef6c2707edc3 (diff) |
Fix bug in whole archive prerequisite change tracking
-rw-r--r-- | libbuild2/cc/link-rule.cxx | 6 |
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) |