Skip to content

Commit 63286d8

Browse files
committed
rewrite c-dynamic-rlib to rmake
1 parent ef07fe1 commit 63286d8

File tree

3 files changed

+22
-20
lines changed

3 files changed

+22
-20
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
run-make/branch-protection-check-IBT/Makefile
22
run-make/c-dynamic-dylib/Makefile
3-
run-make/c-dynamic-rlib/Makefile
43
run-make/c-unwind-abi-catch-lib-panic/Makefile
54
run-make/cat-and-grep-sanity-check/Makefile
65
run-make/cdylib-dylib-linkage/Makefile

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

-19
This file was deleted.
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// This test checks that dynamic Rust linking with C does not encounter any errors in both
2+
// compilation and execution, with static dependencies given preference over dynamic.
3+
// (This is the default behaviour.)
4+
// See https://github.com/rust-lang/rust/issues/10434
5+
6+
//@ ignore-cross-compile
7+
// Reason: the compiled binary is executed
8+
9+
//FIXME(Oneirical): test on apple because older versions of osx are failing apparently
10+
11+
use run_make_support::{
12+
build_native_dynamic_lib, dynamic_lib_name, fs_wrapper, run, run_fail, rustc,
13+
};
14+
15+
fn main() {
16+
build_native_dynamic_lib("cfoo");
17+
rustc().input("foo.rs").run();
18+
rustc().input("bar.rs").run();
19+
run("bar");
20+
fs_wrapper::remove_file(dynamic_lib_name("cfoo"));
21+
run_fail("bar");
22+
}

0 commit comments

Comments
 (0)