Skip to content

Commit 131d453

Browse files
committed
rewrite raw-dylib-alt-calling-conventions to rmake
1 parent 9179d9b commit 131d453

File tree

3 files changed

+28
-25
lines changed

3 files changed

+28
-25
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ run-make/no-alloc-shim/Makefile
2323
run-make/pdb-buildinfo-cl-cmd/Makefile
2424
run-make/pgo-gen-lto/Makefile
2525
run-make/pgo-indirect-call-promotion/Makefile
26-
run-make/raw-dylib-alt-calling-convention/Makefile
2726
run-make/raw-dylib-c/Makefile
2827
run-make/redundant-libs/Makefile
2928
run-make/remap-path-prefix-dwarf/Makefile

tests/run-make/raw-dylib-alt-calling-convention/Makefile

-24
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// `raw-dylib` is a Windows-specific attribute which emits idata sections for the items in the
2+
// attached extern block,
3+
// so they may be linked against without linking against an import library.
4+
// To learn more, read https://github.com/rust-lang/rfcs/blob/master/text/2627-raw-dylib-kind.md
5+
// This test uses this feature alongside alternative calling conventions, checking that both
6+
// features are compatible and result in the expected output upon execution of the binary.
7+
// See https://github.com/rust-lang/rust/pull/84171
8+
9+
//@ only-x86
10+
//@ only-windows
11+
12+
use run_make_support::{build_native_dynamic_lib, diff, is_msvc, run, run_with_args, rustc};
13+
14+
fn main() {
15+
rustc()
16+
.crate_type("lib")
17+
.crate_name("raw_dylib_alt_calling_convention_test")
18+
.input("lib.rs")
19+
.run();
20+
rustc().crate_type("bin").input("driver.rs").run();
21+
build_native_dynamic_lib("extern");
22+
let out = run("driver").stdout_utf8();
23+
diff().expected_file("output.txt").actual_text("actual", out).run();
24+
if is_msvc() {
25+
let out_msvc = run_with_args("driver", &["true"]).stdout_utf8();
26+
diff().expected_file("output.msvc.txt").actual_text("actual", out_msvc).run();
27+
}
28+
}

0 commit comments

Comments
 (0)