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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
626 B
Rust
Raw Normal View History

2024-07-12 14:16:53 -05:00
// This test checks that static Rust linking with C does not encounter any errors,
// with static dependencies given preference over dynamic. (This is the default behaviour.)
// See https://github.com/rust-lang/rust/issues/10434
//@ ignore-cross-compile
// Reason: the compiled binary is executed
use run_make_support::{build_native_static_lib, rfs, run, rust_lib_name, rustc, static_lib_name};
2024-07-12 14:16:53 -05:00
fn main() {
build_native_static_lib("cfoo");
rustc().input("foo.rs").run();
rustc().input("bar.rs").run();
rfs::remove_file(rust_lib_name("foo"));
rfs::remove_file(static_lib_name("cfoo"));
2024-07-12 14:16:53 -05:00
run("bar");
}