2024-02-19 07:03:09 -06:00
|
|
|
include ../tools.mk
|
|
|
|
|
|
|
|
# only-windows-msvc
|
|
|
|
|
|
|
|
all:
|
|
|
|
# Test that we don't have the full path to the PDB file in the binary
|
2024-03-13 05:44:50 -05:00
|
|
|
$(RUSTC) main.rs -g --crate-name my_crate_name --crate-type bin -Cforce-frame-pointers
|
2024-02-19 07:03:09 -06:00
|
|
|
$(CGREP) "my_crate_name.pdb" < $(TMPDIR)/my_crate_name.exe
|
|
|
|
$(CGREP) -v "\\my_crate_name.pdb" < $(TMPDIR)/my_crate_name.exe
|
|
|
|
|
|
|
|
# Test that backtraces still can find debuginfo by checking that they contain symbol names and
|
|
|
|
# source locations.
|
2024-03-14 05:03:15 -05:00
|
|
|
$(TMPDIR)/my_crate_name.exe &> $(TMPDIR)/backtrace.txt
|
|
|
|
$(CGREP) "my_crate_name::fn_in_backtrace" < $(TMPDIR)/backtrace.txt
|
|
|
|
$(CGREP) "main.rs:15" < $(TMPDIR)/backtrace.txt
|
2024-02-19 07:03:09 -06:00
|
|
|
|
|
|
|
# Test that explicitly passed `-Clink-arg=/PDBALTPATH:...` is respected
|
2024-03-13 05:44:50 -05:00
|
|
|
$(RUSTC) main.rs -g --crate-name my_crate_name --crate-type bin -Clink-arg=/PDBALTPATH:abcdefg.pdb -Cforce-frame-pointers
|
2024-02-19 07:03:09 -06:00
|
|
|
$(CGREP) "abcdefg.pdb" < $(TMPDIR)/my_crate_name.exe
|
|
|
|
$(CGREP) -v "my_crate_name.pdb" < $(TMPDIR)/my_crate_name.exe
|