[LLD] [MinGW] Only apply -Bstatic to following libraries
ClosedPublic

Authored by mstorsjo on Wed, Sep 13, 12:56 AM.

Details

Summary

This is how the flag is documented in GNU binutils ld; -Bstatic only applies to -l options after it, until the next -Bdynamic.

Diff Detail

Repository
rL LLVM
mstorsjo created this revision.Wed, Sep 13, 12:56 AM
ruiu accepted this revision.Wed, Sep 13, 9:59 AM

LGTM

MinGW/Driver.cpp
178–180 ↗(On Diff #114989)

Since you have a switch in this loop, you don't need to use filtered. Just for (auto *A : Args) should work.

This revision is now accepted and ready to land.Wed, Sep 13, 9:59 AM
This revision was automatically updated to reflect the committed changes.