Skip to content

Commit 538cdd4

Browse files
committed
rewrite pdb-buildinfo-cl-cmd to rmake
1 parent 66e5852 commit 538cdd4

File tree

4 files changed

+35
-18
lines changed

4 files changed

+35
-18
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ run-make/native-link-modifier-bundle/Makefile
3434
run-make/native-link-modifier-whole-archive/Makefile
3535
run-make/no-alloc-shim/Makefile
3636
run-make/no-builtins-attribute/Makefile
37-
run-make/pdb-buildinfo-cl-cmd/Makefile
3837
run-make/pgo-gen-lto/Makefile
3938
run-make/pgo-indirect-call-promotion/Makefile
4039
run-make/print-calling-conventions/Makefile

tests/run-make/pdb-buildinfo-cl-cmd/Makefile

-16
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Check if the pdb file contains the following information in the LF_BUILDINFO:
2+
// 1. full path to the compiler (cl)
3+
// 2. the commandline args to compile it (cmd)
4+
// This is because these used to be missing in #96475.
5+
// See https://github.com/rust-lang/rust/pull/113492
6+
7+
//@ only-windows-msvc
8+
// Reason: pdb files are unique to this architecture
9+
10+
use run_make_support::{assert_contains, env_var, rfs, rustc};
11+
12+
fn main() {
13+
rustc()
14+
.input("main.rs")
15+
.arg("-g")
16+
.crate_name("my_crate_name")
17+
.crate_type("bin")
18+
.metadata("dc9ef878b0a48666")
19+
.run();
20+
assert_contains(rfs::read_to_string("my_crate_name.pdb"), env_var("RUSTC_ORIGINAL"));
21+
let strings = [
22+
r#""main.rs""#,
23+
r#""-g""#,
24+
r#""--crate-name""#,
25+
r#""my_crate_name""#,
26+
r#""--crate-type""#,
27+
r#""bin""#,
28+
r#""-C""#,
29+
r#""metadata=dc9ef878b0a48666""#,
30+
r#""--out-dir""#,
31+
];
32+
for string in strings {
33+
assert_contains(rfs::read_to_string("my_crate_name.pdb"), string);
34+
}
35+
}

tests/run-make/pdb-buildinfo-cl-cmd/stringlist.txt

-1
This file was deleted.

0 commit comments

Comments
 (0)