[lld] [LLD][Cygwin] Implement --dll-search-prefix (PR #143263)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 7 10:54:18 PDT 2025


================
@@ -553,6 +554,10 @@ bool link(ArrayRef<const char *> argsArr, llvm::raw_ostream &stdoutOS,
     searchPaths.push_back(a->getValue());
     add("-libpath:" + StringRef(a->getValue()));
   }
+  StringRef dllPrefix = "lib";
+  for (auto *a : args.filtered(OPT_dll_search_prefix)) {
+    dllPrefix = a->getValue();
+  }
----------------
jeremyd2019 wrote:

```suggestion
  if (auto *arg = args.getLastArg(OPT_dll_search_prefix))
    dllPrefix = arg->getValue();
```

https://github.com/llvm/llvm-project/pull/143263


More information about the llvm-commits mailing list