blob: 6d38282c2e395060333cbe783429e78a0b442e1d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// 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
use run_make_support::{dynamic_lib_name, path, rfs, run, rust_lib_name, rustc};
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();
rfs::remove_file(rust_lib_name("bar"));
rfs::remove_file(dynamic_lib_name("bar"));
run("foo");
}
|