[lld] [lld][COFF] Add /linkreprofullpathrsp flag (PR #165449)
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 3 08:15:09 PST 2025
================
@@ -0,0 +1,38 @@
+# REQUIRES: x86
+# Unsupported on Windows due to maximum path length limitations.
+
+# RUN: rm -rf %t.dir
+# RUN: split-file %s %t.dir
+# RUN: yaml2obj %p/Inputs/hello32.yaml -o %t.obj
+# RUN: llvm-mc -filetype=obj -triple=i386-windows %t.dir/drectve.s -o %t.dir/drectve.obj
+# RUN: echo '_main at 0' > %t.order
+# RUN: touch %t.def
+# RUN: touch %t.cg
+
+
+
+Test link.exe-style /linkreprofullpathrsp: flag.
+# RUN: mkdir -p %t.dir/build1
+# RUN: cd %t.dir/build1
+# RUN: lld-link %t.obj %p/Inputs/std32.lib /subsystem:console /defaultlib:%p/Inputs/library.lib \
+# RUN: /entry:main at 0 /linkreprofullpathrsp:%t.rsp /out:%t.exe
+# RUN: FileCheck %s --check-prefix=RSP -DT=%t -DP=%p < %t.rsp
+
+# RSP: [[T]].obj
+# RSP-NEXT: "[[P]]/Inputs/std32.lib"
+# RSP-NEXT: "/defaultlib:[[P]]/Inputs/library.lib"
+
----------------
aganea wrote:
If you do `lld-link input1.obj input2.obj /listreprofullpathrsp:file.rsp` then in a second execution you could do `lld-link @file.rsp` which should yield the same outcomes (same warnings if any, same outputs).
As for warnings, you can do `RSP-NOT: warning` to ensure the absence of warnings. Same thing for debug info, assuming that `/debug` is used during the link phase, you can use `llvm-pdbutil dump -all %t.pdb | FileCheck %s ...` to ascertain that same important debug information is there. Usually you can run that `llvm-pdbutil` command manually on your local machine, and copy-paste in the test a few lines that should be important.
https://github.com/llvm/llvm-project/pull/165449
More information about the llvm-commits
mailing list