Skip to content

Commit a05a7df

Browse files
committed
rewrite c-static-rlib to rmake
1 parent e5a234d commit a05a7df

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ run-make/atomic-lock-free/Makefile
33
run-make/branch-protection-check-IBT/Makefile
44
run-make/c-dynamic-dylib/Makefile
55
run-make/c-dynamic-rlib/Makefile
6-
run-make/c-static-rlib/Makefile
76
run-make/c-unwind-abi-catch-lib-panic/Makefile
87
run-make/c-unwind-abi-catch-panic/Makefile
98
run-make/cat-and-grep-sanity-check/Makefile

tests/run-make/c-static-rlib/Makefile

Lines changed: 0 additions & 12 deletions
This file was deleted.

tests/run-make/c-static-rlib/rmake.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// This test checks that static Rust linking with C does not encounter any errors,
2+
// with static dependencies given preference over dynamic. (This is the default behaviour.)
3+
// See https://github.com/rust-lang/rust/issues/10434
4+
5+
//@ ignore-cross-compile
6+
// Reason: the compiled binary is executed
7+
8+
use run_make_support::{
9+
build_native_static_lib, fs_wrapper, run, rust_lib_name, rustc, static_lib_name,
10+
};
11+
12+
fn main() {
13+
build_native_static_lib("cfoo");
14+
rustc().input("foo.rs").run();
15+
rustc().input("bar.rs").run();
16+
fs_wrapper::remove_file(rust_lib_name("foo"));
17+
fs_wrapper::remove_file(static_lib_name("cfoo"));
18+
run("bar");
19+
}

0 commit comments

Comments
 (0)