[PATCH] D33880: COFF: Introduce LD shim around LINK

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 8 22:51:25 PDT 2017


mstorsjo added inline comments.


================
Comment at: MinGW/Driver.cpp:179
+  forward(Args, OPT_o, "out",
+          convertValue(Args, OPT_shared, "dll") ? "a.exe" : "a.dll");
+  forward(Args, OPT_entry, "entry");
----------------
Shouldn't you swap a.exe and a.dll here?


================
Comment at: MinGW/Options.td:18
+def subs: Separate<["--"], "subsystem">, HelpText<"Specify subsystem">;
+def stack: Flag<["--"], "stack">, Alias<stack>;
+def outlib: Separate<["--"], "out-implib">, HelpText<"Import library name">;
----------------
If testing -stack, you'll notice that this will recurse infinitely - remove the alias.


================
Comment at: test/MinGW/output.test:10
+
+# RUN: llvm-readobj a.exe | FileCheck %s
+# RUN: llvm-readobj a.dll | FileCheck %s
----------------
This doesn't test that a.exe is produced by the right command.

Missing tests for -subs, -stack, -o, -outlib and actually referring to the image_base symbol.

If setting e.g. -subs, I think it would make sense to check for it in the readobj output, and check that the dll actually is a dll etc.

Also, since the input file is used only once, Rui has earlier preferred to move that data into this file, and rename it to .yaml.


Repository:
  rL LLVM

https://reviews.llvm.org/D33880





More information about the llvm-commits mailing list