aboutsummaryrefslogtreecommitdiff
path: root/lld/test
diff options
context:
space:
mode:
authorGkvJwa <gkvjwa@gmail.com>2024-06-17 23:20:06 +0800
committerGitHub <noreply@github.com>2024-06-17 11:20:06 -0400
commitc11677eedb2c302df0392af4bf21fb2f4978669b (patch)
tree3ac49ffb7f47aca35d9cde4c706a62a809a98ddb /lld/test
parentf06575832aac0682c4d7383de34d2a9c20aa5837 (diff)
downloadllvm-c11677eedb2c302df0392af4bf21fb2f4978669b.zip
llvm-c11677eedb2c302df0392af4bf21fb2f4978669b.tar.gz
llvm-c11677eedb2c302df0392af4bf21fb2f4978669b.tar.bz2
[LLD][COFF] Support finding pdb files from outputpath (#94153)
In addition to looking for dependent (input) PDB files next to the associated .OBJ file, we now also look into the output folder as well. This mimics MSVC link.exe behavior. Fixes #94152
Diffstat (limited to 'lld/test')
-rw-r--r--lld/test/COFF/pdb-type-server-simple.test7
1 files changed, 7 insertions, 0 deletions
diff --git a/lld/test/COFF/pdb-type-server-simple.test b/lld/test/COFF/pdb-type-server-simple.test
index e9757d1..93d66cd 100644
--- a/lld/test/COFF/pdb-type-server-simple.test
+++ b/lld/test/COFF/pdb-type-server-simple.test
@@ -27,6 +27,10 @@ Re-run with /DEBUG:GHASH
RUN: lld-link a.obj b.obj -entry:main -debug:ghash -out:t.exe -pdb:t.pdb -nodefaultlib -summary -verbose
RUN: llvm-pdbutil dump -symbols -types -ids -globals %t/t.pdb | FileCheck %s
+Re-run with pdb from outputpath
+RUN: mkdir -p libs
+RUN: cp a.obj libs/a.obj && cp b.obj libs/b.obj
+RUN: lld-link libs/a.obj libs/b.obj -entry:main -debug:ghash -out:t.exe -pdb:t.pdb -nodefaultlib -summary 2>&1 | FileCheck %s -check-prefix FAILURE-MISSING-PDBFILE
CHECK-LABEL: Types (TPI Stream)
CHECK: ============================================================
@@ -125,3 +129,6 @@ SUMMARY-NEXT: index total bytes count size
SUMMARY-NEXT: 0x1006: 256 = 1 * 256
SUMMARY: Run llvm-pdbutil to print details about a particular record:
SUMMARY-NEXT: llvm-pdbutil dump -ids -id-index 0x1006 t.pdb
+
+FAILURE-MISSING-PDBFILE-NOT: Cannot use debug info for '{{.*}}.obj'
+FAILURE-MISSING-PDBFILE-NOT: failed to load reference '{{.*}}.pdb': no such file or directory