xref: /llvm-project/lld/test/COFF/debug-dwarf.test (revision e36535d4bebadfbcfea34aa369743aafc43dcf6c)
1# Check that /debug creates %t.pdb.
2# RUN: rm -f %t.pdb
3# RUN: lld-link /debug /entry:main /out:%t.exe %p/Inputs/ret42.obj
4# RUN: ls %t.pdb
5
6# Check that /debug:dwarf does not create %t.pdb.
7# RUN: rm -f %t.pdb
8# RUN: lld-link /debug:dwarf /entry:main /out:%t.exe %p/Inputs/ret42.obj
9# RUN: not ls %t.pdb
10
11# Check that /debug:dwarf /debug creates %t.pdb.
12# RUN: rm -f %t.pdb
13# RUN: lld-link /debug:dwarf /debug /entry:main /out:%t.exe %p/Inputs/ret42.obj
14# RUN: ls %t.pdb
15
16# Check that /debug:dwarf /pdb:%t.pdb does not create %t.pdb.
17# RUN: rm -f %t.pdb
18# RUN: lld-link /debug:dwarf /pdb:%t.pdb /entry:main /out:%t.exe %p/Inputs/ret42.obj
19# RUN: not ls %t.pdb
20
21# Check that /debug /debug:dwarf or /debug:full,dwarf creates %t.pdb.
22# RUN: rm -f %t.pdb
23# RUN: lld-link /debug /debug:dwarf /entry:main /out:%t.exe %p/Inputs/ret42.obj
24# RUN: ls %t.pdb
25# RUN: rm -f %t.pdb
26# RUN: lld-link /debug:full,dwarf /entry:main /out:%t.exe %p/Inputs/ret42.obj
27# RUN: ls %t.pdb
28
29# Check that /debug /debug:full,nodwarf creates %t.pdb.
30# RUN: rm -f %t.pdb
31# RUN: lld-link /debug:full,nodwarf /entry:main /out:%t.exe %p/Inputs/ret42.obj
32# RUN: ls %t.pdb
33