This is an archive of the discontinued LLVM Phabricator instance.

[LLD] [MinGW] Map the -verbose option, implement -### for showing the produced parameters
ClosedPublic

Authored by mstorsjo on Sep 11 2017, 1:32 PM.

Details

Summary

Pass the -verbose option through to the COFF linker, and show the arguments passed to it. If the -### option is specified, just show the produced argument list and exit, just like in clang.

Replace the first argument with "lld-link" in order to produce a correct command line.

Diff Detail

Repository
rL LLVM

Event Timeline

mstorsjo created this revision.Sep 11 2017, 1:32 PM
ruiu accepted this revision.Sep 11 2017, 1:37 PM

This is what I'm trying to do, but as you already have a patch, please go ahead and submit. LGTM.

I'm rewriting tests so that we verify resulting command lines instead of verifying output files. I'll send you a patch shortly.

MinGW/Driver.cpp
182–184 ↗(On Diff #114672)

include llvm/ADT/StringExtras.h so that you can do

if (...)
  outs() << llvm::join(LinkArgs, " ") << "\n";
This revision is now accepted and ready to land.Sep 11 2017, 1:37 PM
This revision was automatically updated to reflect the committed changes.