[PATCH] D37772: [LLD] [MinGW] Support dllexport on i386

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 00:53:39 PDT 2017


mstorsjo added inline comments.


================
Comment at: COFF/Driver.cpp:237-242
+      if (Config->Machine == I386 && Config->MinGW) {
+        if (!isDecorated(E.Name))
+          E.Name = Saver.save("_" + E.Name);
+        if (!E.ExtName.empty() && !isDecorated(E.ExtName))
+          E.ExtName = Saver.save("_" + E.ExtName);
+      }
----------------
ruiu wrote:
> This is pretty hairy rule, but yeah, this is probably unavoidable.
Yeah; this is the same logic as in the main handling of `OPT_export` on the command line though, modulo the extra `&& Config->MinGW`.


================
Comment at: COFF/Driver.cpp:728
 
+  // Handle /mingw early, since it can potentially affect how other
+  // options are handled.
----------------
ruiu wrote:
> Since it is an internal flag, I'd like to name this /lldmingw.
Ok, will change.


================
Comment at: COFF/Options.td:107
 def nosymtab : F<"nosymtab">;
+def mingw : F<"mingw">, HelpText<"Switch to MinGW behaviour where necessary">;
 def msvclto : F<"msvclto">;
----------------
ruiu wrote:
> We don't want to show a help message for an internal flag.
Removed


https://reviews.llvm.org/D37772





More information about the llvm-commits mailing list