[PATCH] D88877: [ELF] Drop --whole-archive before processing dependent libraries.

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 21 08:03:17 PDT 2020


ikudrin added inline comments.


================
Comment at: lld/test/ELF/deplibs-ignore-whole-archive.s:7
+## with the "duplicate symbol" error even if a dependent library is referenced
+## more than once, which is very common with them.
+
----------------
bd1976llvm wrote:
> If we implement deduplication for dependent libraries then this test may spuriously pass. I would rewrite the test so that it uses --trace to check that unreferenced archive members are not added to the link. I would also add a comment to say that --whole-archive applying to dependent libraries is confusing and build-systems are not always able to add an option (--no-whole-archive) to the very end of the command line.
I have extended the comment. As for a different implementation which might also make the test pass, I do not think the way the issue is fixed really matters. Note also that the test already checks that `bar`, the symbol which is not referenced, is not included in the output. What advantages does checking for absence with `--trace` have?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88877/new/

https://reviews.llvm.org/D88877



More information about the llvm-commits mailing list