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

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 1 07:43:21 PDT 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:

We should probably exercice the link command a second time, by using the generated .rsp to ensure it works as expected. It wouldn't be bad if we checked afterwards some expected outcomes, such as the presence of symbols in the binary as well as the presence of debug info (and maybe ensure no warnings are generated).

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


More information about the llvm-commits mailing list