1 # RUN: yaml2obj %p/Inputs/empty.yaml -o %t.obj
3 # RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbaltpath:hello.pdb
4 # RUN: llvm-readobj --coff-debug-directory %t.exe | FileCheck --check-prefix HELLO %s
5 # HELLO: PDBFileName: hello.pdb
7 # RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbaltpath:%_Pdb%
8 # RUN: llvm-readobj --coff-debug-directory %t.exe | FileCheck --check-prefix PDBVAR %s
9 # PDBVAR: PDBFileName: pdbaltpath.test.tmp.pdb
11 # RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbaltpath:foo%_ExT%.pdb
12 # RUN: llvm-readobj --coff-debug-directory %t.exe | FileCheck --check-prefix EXTVAR %s
13 # EXTVAR: PDBFileName: fooexe.pdb
15 # RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbaltpath:%_PDB
16 # RUN: llvm-readobj --coff-debug-directory %t.exe | FileCheck --check-prefix NOCLOSE %s
17 # NOCLOSE: PDBFileName: %_PDB
19 # RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbaltpath:foo%_PDB
20 # RUN: llvm-readobj --coff-debug-directory %t.exe | FileCheck --check-prefix NOCLOSE2 %s
21 # NOCLOSE2: PDBFileName: foo%_PDB
23 # RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbaltpath:foo%_PDB%bar%_EXT
24 # RUN: llvm-readobj --coff-debug-directory %t.exe | FileCheck --check-prefix CLOSEONE %s
25 # CLOSEONE: PDBFileName: foopdbaltpath.test.tmp.pdbbar%_EXT
27 # RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbaltpath:foo%_PDB%bar%_EXT%
28 # RUN: llvm-readobj --coff-debug-directory %t.exe | FileCheck --check-prefix CLOSETWO %s
29 # CLOSETWO: PDBFileName: foopdbaltpath.test.tmp.pdbbarexe
31 # RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbaltpath:foo%_PDB%bar%_EXT%a
32 # RUN: llvm-readobj --coff-debug-directory %t.exe | FileCheck --check-prefix CLOSETWO2 %s
33 # CLOSETWO2: PDBFileName: foopdbaltpath.test.tmp.pdbbarexea
35 # RUN: lld-link /entry:main %t.obj /out:%t.exe /debug /pdbaltpath:foo%FoO%bar%r%a 2>&1 | FileCheck --check-prefix UNKNOWN-WARN %s
36 # RUN: llvm-readobj --coff-debug-directory %t.exe | FileCheck --check-prefix ENVVARS %s
37 # UNKNOWN-WARN: only %_PDB% and %_EXT% supported in /pdbaltpath:, keeping %FoO% as literal
38 # UNKNOWN-WARN: only %_PDB% and %_EXT% supported in /pdbaltpath:, keeping %r% as literal
39 # ENVVARS: PDBFileName: foo%FoO%bar%r%a