mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
4cdc633301
Set Arg0 and CommandLineArgs in MCTargetoptions so LLVM outputs correct CL and CMD in LF_DEBUGINFO instead of empty/invalid values.
17 lines
763 B
Makefile
17 lines
763 B
Makefile
include ../tools.mk
|
|
|
|
# only-windows-msvc
|
|
|
|
# tests if the pdb contains the following information in the LF_BUILDINFO:
|
|
# 1. the commandline args to compile it (cmd)
|
|
# 2. full path to the compiler (cl)
|
|
|
|
# we just do a stringsearch on the pdb, as these need to show up at least once, as the LF_BUILDINFO is created for each cgu
|
|
# actual parsing would be better, but this is a simple and good enough solution for now
|
|
|
|
all:
|
|
$(RUSTC_ORIGINAL) main.rs -g --crate-name my_crate_name --crate-type bin -C metadata=dc9ef878b0a48666 --out-dir $(TMPDIR)
|
|
cat '$(TMPDIR)/my_crate_name.pdb' | grep -F '$(RUSTC_ORIGINAL)'
|
|
# using a file containing the string so I don't have problems with escaping quotes and spaces
|
|
cat '$(TMPDIR)/my_crate_name.pdb' | grep -f 'stringlist.txt'
|