[LLD] [MinGW] Print errors/warnings in lld-link with a "ld.lld" prefix
authorMartin Storsjö <martin@martin.st>
Fri, 18 Jun 2021 11:29:55 +0000 (14:29 +0300)
committerMartin Storsjö <martin@martin.st>
Sat, 19 Jun 2021 19:32:37 +0000 (22:32 +0300)
commit1c8bb625b716b647206bcf5f51ac1c356ec2985e
tree9e79329cedc666a6ff0c543ab4f92f3cd2eaca3e
parent0f558db742fa52745f475d84336f88f04380e2fb
[LLD] [MinGW] Print errors/warnings in lld-link with a "ld.lld" prefix

Pass the original argv[0] to the coff linker, as the coff linker uses
the basename of argv[0] as the log prefix.

This makes error messages to be printed with a "ld.lld:" prefix
instead of "lld-link:". The current "lld-link:" prefix can be confusing
to users, as they're invoking the MinGW linker (and might not even have
a lld-link executable).

Keep the first argument as lld-link when printing the command line, to
make it an actually reproducible standalone command.

Differential Revision: https://reviews.llvm.org/D104526
lld/MinGW/Driver.cpp
lld/test/MinGW/driver.test