[lld] [lld][COFF] Add /linkreprofullpathrsp flag (PR #165449)

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 3 06:19:57 PST 2025


================
@@ -356,8 +357,17 @@ void LinkerDriver::enqueuePath(StringRef path, bool wholeArchive, bool lazy) {
         Err(ctx) << msg;
       else
         Err(ctx) << msg << "; did you mean '" << nearest << "'";
-    } else
+    } else {
+      // Write full path to library to repro file if /linkreprofullpathrsp
+      // is specified.
+      if (reproFile) {
+        *reproFile << '"';
+        if (defaultlib)
+          *reproFile << "/defaultlib:";
+        *reproFile << pathStr << "\"\n";
+      }
----------------
aganea wrote:

You can make the path absolute before writing it in the raw ostream:
```
SmallString<128> absolutePath = pathStr;
sys::fs::make_absolute(absolutePath);
```

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


More information about the llvm-commits mailing list