[PATCH] D38760: [LLD] [COFF] Add support for automatically exporting all symbols

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 10 14:27:18 PDT 2017


mstorsjo added a comment.

Thanks for the review - one inline response to a comment, will do the other suggested changes tomorrow.



================
Comment at: COFF/Driver.cpp:1212
 
+  if (Config->DLL && ((Config->MinGW && Config->Exports.empty()) ||
+                      Args.hasArg(OPT_export_all_symbols))) {
----------------
ruiu wrote:
> ruiu wrote:
> > Is it doable for the mingw driver to always add -export-all-symbols if -export is empty? If you can do this, you can remove `Config->MinGW && Config->Exports.empty()` from this expression.
> This needs comment to make it clear that this is for MinGW, and in MinGW, all symbols are automatically exported if no symbols are chosen to be exported.
No, the mingw driver doesn't know whether the object files will contain any dllexport directives, so it can't take care of setting that flag.


https://reviews.llvm.org/D38760





More information about the llvm-commits mailing list