[PATCH] D47565: Fix /WholeArchive bug.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 31 10:05:17 PDT 2018


rnk added inline comments.


================
Comment at: lld/COFF/Driver.cpp:1234
+  for (auto *Arg : Args.filtered(OPT_wholearchive_file))
+    WholeArchive.insert(Arg->getValue());
+
----------------
rnk wrote:
> I think we need to canonicalize the path a little to ensure that this works on case insensitive file systems:
> $ lld-link foo.lib -wholearchive:Foo.lib
> 
> We shouldn't enqueue the same file twice, right?
> 
> Also, maybe we should just enqueue all whole archive inputs in this loop, up front, and then only process inputs later if the input wasn't already added as a whole archive input.
I guess to make it easy to write a cross-platform test for path canonicalization, the test could use:
$ lld-link ./foo.lib -wholearchive:foo.lib


https://reviews.llvm.org/D47565





More information about the llvm-commits mailing list