[PATCH] D63024: [LLD] [Driver] Look for -m in response files as well

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 10 04:56:31 PDT 2019


mstorsjo marked 2 inline comments as done.
mstorsjo added inline comments.


================
Comment at: tools/lld/lld.cpp:141-143
+    SmallVector<const char *, 256> ExpandedArgs(Args.data(),
+                                                Args.data() + Args.size());
+    cl::ExpandResponseFiles(Saver, getDefaultQuotingStyle(), ExpandedArgs);
----------------
ruiu wrote:
> If you factor this piece of code to a new function, we can discard SmallVector, saving a small amount of memory.
Could do that, but...


================
Comment at: tools/lld/lld.cpp:145
+    if (isPETarget(ExpandedArgs))
+      return !mingw::link(ExpandedArgs);
     return !elf::link(Args, canExitEarly());
----------------
ruiu wrote:
> Is it intentional that you call mingw::link with ExpandedArgs?
The MinGW driver does no expansion of its own right now; I guess it would be better to do that there instead of passing the expanded args here - for consistency?


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

https://reviews.llvm.org/D63024





More information about the llvm-commits mailing list