[PATCH] D37709: [LLD] [COFF] Add support for the -wholearchive option

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 12 14:13:08 PDT 2017


pcc added inline comments.


================
Comment at: COFF/Driver.cpp:975
+      if (Optional<StringRef> Path = findFile(Arg->getValue()))
+        enqueuePath(*Path, WholeArchive);
+      break;
----------------
ruiu wrote:
> Replacing `WholeArchive` with `Args.hasArg(OPT_wholearchive_flag)` might improve readability.
Wouldn't that create O(N^2) complexity in the size of the argument list though?


================
Comment at: COFF/Driver.cpp:233
       if (Optional<StringRef> Path = findLib(Arg->getValue()))
-        enqueuePath(*Path);
+        enqueuePath(*Path, false);
       break;
----------------
Are you sure that `/wholearchive` has no effect on archives specified by linker directives?


https://reviews.llvm.org/D37709





More information about the llvm-commits mailing list