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

Martell Malone via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 23 09:57:50 PDT 2017


martell added inline comments.


================
Comment at: MinGW/Driver.cpp:97
+// This is for -lfoo. We'll look for libfoo.dll.a or libfoo.a from search paths.
+Optional<std::string> searchLibrary(StringRef Name, bool IgnoreShared = false) {
+  if (Name.startswith(":"))
----------------
ruiu wrote:
> You are using this function only once, and at that call site `IgnoreShared` is not passed, so it is always false. Please remove that parameter.
It is based on the `-Bstatic` flag.

`addLibrary(Arg->getValue(), Args.hasArg(OPT_Bstatic));`
which in turn calls
`searchLibrary(Name, StaticOnly))`
passing in the bool


Repository:
  rL LLVM

https://reviews.llvm.org/D33880





More information about the llvm-commits mailing list