Skip to content

Commit a2ed16c

Browse files
committed
rewrite mingw-export-call-convention to rmake
1 parent 9dff8a3 commit a2ed16c

File tree

4 files changed

+21
-16
lines changed

4 files changed

+21
-16
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ run-make/manual-link/Makefile
110110
run-make/many-crates-but-no-match/Makefile
111111
run-make/metadata-dep-info/Makefile
112112
run-make/min-global-align/Makefile
113-
run-make/mingw-export-call-convention/Makefile
114113
run-make/missing-crate-dependency/Makefile
115114
run-make/mixing-libs/Makefile
116115
run-make/msvc-opt-minsize/Makefile

tests/run-make/mingw-export-call-convention/Makefile

-9
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// On windows-gnu, symbol exporting used to fail to export names
2+
// with no_mangle. #72049 brought this feature up to par with msvc,
3+
// and this test checks that the symbol "bar" is successfully exported.
4+
// See https://github.com/rust-lang/rust/issues/50176
5+
6+
//@ only-x86_64-pc-windows-gnu
7+
8+
use run_make_support::{llvm_readobj, rustc};
9+
10+
fn main() {
11+
rustc().input("foo.rs").run();
12+
llvm_readobj().arg("--all").input("libfoo.dll.a").run().assert_stdout_contains("bar");
13+
}

tests/run-make/pdb-alt-path/rmake.rs

+8-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
// checks that no full file paths are exposed and that the override flag is respected.
66
// See https://github.com/rust-lang/rust/pull/121297
77

8-
//@ only-windows
8+
//@ only-x86_64-pc-windows-msvc
9+
10+
use run_make_support::{bin_name, invalid_utf8_contains, invalid_utf8_not_contains, run, rustc};
911

1012
fn main() {
1113
// Test that we don't have the full path to the PDB file in the binary
@@ -16,11 +18,11 @@ fn main() {
1618
.crate_type("bin")
1719
.arg("-Cforce-frame-pointers")
1820
.run();
19-
invalid_utf8_contains(bin_name("my_crate_name"), "my_crate_name.pdb");
20-
invalid_utf8_not_contains(bin_name("my_crate_name"), r#"\my_crate_name.pdb"#);
21+
invalid_utf8_contains(&bin_name("my_crate_name"), "my_crate_name.pdb");
22+
invalid_utf8_not_contains(&bin_name("my_crate_name"), r#"\my_crate_name.pdb"#);
2123
// Test that backtraces still can find debuginfo by checking that they contain symbol names and
2224
// source locations.
23-
let out = run(bin_name(my_crate_name));
25+
let out = run(&bin_name("my_crate_name"));
2426
out.assert_stdout_contains("my_crate_name::fn_in_backtrace");
2527
out.assert_stdout_contains("main.rs:15");
2628
// Test that explicitly passed `-Clink-arg=/PDBALTPATH:...` is respected
@@ -32,6 +34,6 @@ fn main() {
3234
.link_arg("/PDBALTPATH:abcdefg.pdb")
3335
.arg("-Cforce-frame-pointers")
3436
.run();
35-
invalid_utf8_contains(bin_name("my_crate_name"), "abcdefg.pdb");
36-
invalid_utf8_not_contains(bin_name("my_crate_name"), "my_crate_name.pdb");
37+
invalid_utf8_contains(&bin_name("my_crate_name"), "abcdefg.pdb");
38+
invalid_utf8_not_contains(&bin_name("my_crate_name"), "my_crate_name.pdb");
3739
}

0 commit comments

Comments
 (0)