[LLD] [MinGW] Look for other library patterns with -l
authorMartin Storsjo <martin@martin.st>
Thu, 10 Oct 2019 08:52:39 +0000 (08:52 +0000)
committerMartin Storsjo <martin@martin.st>
Thu, 10 Oct 2019 08:52:39 +0000 (08:52 +0000)
commit0226c35262df380dafb701df999e1b77bcf8f7f9
tree2ecfd65fba52a272239fe610a68522b04ce00c53
parente742794ffa430d7b50f5c69841546deef100ca14
[LLD] [MinGW] Look for other library patterns with -l

GNU ld looks for a number of other patterns than just lib<name>.dll.a
and lib<name>.a.

GNU ld does support linking directly against a DLL without using an
import library. If that's the only match for a -l argument, point out
that the user needs to use an import library, instead of leaving the
user with a puzzling message about the -l argument not being found
at all.

Also convert an existing case of fatal() into error().

Differential Revision: https://reviews.llvm.org/D68689

llvm-svn: 374292
lld/MinGW/Driver.cpp
lld/test/MinGW/lib.test