From cedf1eb8d6aa33c6bdf3c7d65095f08dc2e9d81e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 5 Sep 2024 09:41:00 +0200 Subject: Fix bug in whole archive prerequisite change tracking --- libbuild2/cc/link-rule.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libbuild2') 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) -- cgit v1.1