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

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 18 07:45:46 PST 2025


================
@@ -318,11 +318,31 @@ void LinkerDriver::addBuffer(std::unique_ptr<MemoryBuffer> mb,
   }
 }
 
-void LinkerDriver::enqueuePath(StringRef path, bool wholeArchive, bool lazy) {
+void LinkerDriver::handleReproFile(StringRef path, InputType inputType) {
+  if (!reproFile)
+    return;
+
+  *reproFile << '"';
+  if (inputType == InputType::DefaultLib)
+    *reproFile << "/defaultlib:";
+  else if (inputType == InputType::WholeArchive)
+    *reproFile << "/wholearchive:";
+
+  SmallString<128> absPath = path;
+  std::error_code ec = sys::fs::make_absolute(absPath);
+  if (ec)
+    Err(ctx) << "cannot find absolute path for reproFile for " << absPath
+             << ": " << ec.message();
+  sys::path::remove_dots(absPath, true);
+  *reproFile << absPath << "\"\n";
+  reproFile->flush();
----------------
aganea wrote:

Because we're not calling destructors, to speed up shutdown, please see https://github.com/llvm/llvm-project/blob/main/lld/Common/DriverDispatcher.cpp#L167

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


More information about the llvm-commits mailing list