2024-06-12 03:52:44 -05:00
|
|
|
// Check that `foo.rs` prefers to link to `bar` statically, and can be executed even if the `bar`
|
|
|
|
// library artifacts are removed.
|
|
|
|
|
|
|
|
//@ ignore-cross-compile
|
|
|
|
|
2024-07-17 08:31:38 -05:00
|
|
|
use run_make_support::{dynamic_lib_name, path, rfs, run, rust_lib_name, rustc};
|
2024-06-12 03:52:44 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
rustc().input("bar.rs").crate_type("dylib").crate_type("rlib").run();
|
|
|
|
assert!(path(rust_lib_name("bar")).exists());
|
|
|
|
rustc().input("foo.rs").run();
|
2024-07-17 07:42:06 -05:00
|
|
|
rfs::remove_file(rust_lib_name("bar"));
|
|
|
|
rfs::remove_file(dynamic_lib_name("bar"));
|
2024-06-12 03:52:44 -05:00
|
|
|
run("foo");
|
|
|
|
}
|