[COFF] Allow exporting all symbols from system libraries specfied with -wholearchive:
authorMartin Storsjo <martin@martin.st>
Tue, 4 Sep 2018 20:56:56 +0000 (20:56 +0000)
committerMartin Storsjo <martin@martin.st>
Tue, 4 Sep 2018 20:56:56 +0000 (20:56 +0000)
commita47957ab130122f874548315aec198b7d1005fb9
treefa886da2267c49fd41b46cf78623473153cd2b39
parent68df812cceaccda7cc0d83aa38db3225b3b53652
[COFF] Allow exporting all symbols from system libraries specfied with -wholearchive:

When building a shared libc++.dll, it pulls in libc++abi.a statically
with the --wholearchive flag. If such a build is done with
--export-all-symbols, it's reasonable to assume that everything
from that library also should be exported with the same rules as normal
local object files, even though we normally avoid autoexporting things
from libc++abi.a in other cases when linking a DLL (user code).

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

llvm-svn: 341403
lld/COFF/Driver.cpp
lld/COFF/MinGW.cpp
lld/COFF/MinGW.h
lld/test/COFF/export-all.s