Skip to content

Commit 2804d42

Browse files
authored
Rollup merge of #125027 - Oneirical:c-test-with-remove, r=jieyouxu
Migrate `run-make/c-link-to-rust-staticlib` to `rmake` Part of #121876. r? `@jieyouxu`
2 parents 2e70bea + 91a3f04 commit 2804d42

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ run-make/branch-protection-check-IBT/Makefile
88
run-make/c-dynamic-dylib/Makefile
99
run-make/c-dynamic-rlib/Makefile
1010
run-make/c-link-to-rust-dylib/Makefile
11-
run-make/c-link-to-rust-staticlib/Makefile
1211
run-make/c-static-dylib/Makefile
1312
run-make/c-static-rlib/Makefile
1413
run-make/c-unwind-abi-catch-lib-panic/Makefile

tests/run-make/c-link-to-rust-staticlib/Makefile

-16
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// This test checks that C linking with Rust does not encounter any errors, with a static library.
2+
// See https://github.com/rust-lang/rust/issues/10434
3+
4+
//@ ignore-cross-compile
5+
6+
use run_make_support::{cc, extra_c_flags, run, rustc, static_lib};
7+
use std::fs;
8+
9+
fn main() {
10+
rustc().input("foo.rs").run();
11+
cc().input("bar.c").input(static_lib("foo")).out_exe("bar").args(&extra_c_flags()).run();
12+
run("bar");
13+
fs::remove_file(static_lib("foo"));
14+
run("bar");
15+
}

0 commit comments

Comments
 (0)