[MinGW, CrossWindows] Allow passing -static together with -shared
authorMartin Storsjo <martin@martin.st>
Tue, 27 Feb 2018 19:42:19 +0000 (19:42 +0000)
committerMartin Storsjo <martin@martin.st>
Tue, 27 Feb 2018 19:42:19 +0000 (19:42 +0000)
commitca4a24eb72aab56419ec41970fc1880d8bf22638
treec69050a9dc833a51e3fbb413f02081757996fb96
parentd1400213f524607820734ebf2efdf5e12db4a662
[MinGW, CrossWindows] Allow passing -static together with -shared

In these combinations, link a DLL as usual, but pass -Bstatic instead
of -Bdynamic to indicate prefering static libraries.

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

llvm-svn: 326235
clang/lib/Driver/ToolChains/CrossWindows.cpp
clang/lib/Driver/ToolChains/MinGW.cpp
clang/test/Driver/mingw-libgcc.c
clang/test/Driver/windows-cross.c