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

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 4 01:40:01 PDT 2017


mstorsjo added inline comments.


================
Comment at: lib/CMakeLists.txt:4
 add_subdirectory(Driver)
+add_subdirectory(Mingw)
 add_subdirectory(ReaderWriter)
----------------
Afaik Rui requested this to be a separate directory on the toplevel (next to COFF and ELF), not within lib.


================
Comment at: lib/Mingw/CMakeLists.txt:10
+add_lld_library(lldCOFFShim
+  COFFLdShim.cpp
+
----------------
I think Rui requested this to be named MingwDriver.cpp or Driver.cpp as well.


================
Comment at: lib/Mingw/COFFLdShim.cpp:102
+  if (Path1.startswith("="))
+    sys::path::append(S, Sysroot, Path1.substr(1), Path2);
+  else
----------------
As far as I can see, nothing sets the `Sysroot` variable used here.

One might want to add a stub option `--sysroot` to `Options.td` as well, to handle the case if the user passes `--sysroot` to the clang frontend. In those cases, the clang driver already takes care of most of it (adding the right `-L` parameters to lld), so we can get pretty far by just ignoring it instead of erroring out.


Repository:
  rL LLVM

https://reviews.llvm.org/D33880





More information about the llvm-commits mailing list