Skip to content

Commit f2cce98

Browse files
Migrate run-make/prefer-rlib to rmake.rs
1 parent 76c7382 commit f2cce98

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
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
@@ -175,7 +175,6 @@ run-make/pgo-gen/Makefile
175175
run-make/pgo-indirect-call-promotion/Makefile
176176
run-make/pgo-use/Makefile
177177
run-make/pointer-auth-link-with-c/Makefile
178-
run-make/prefer-rlib/Makefile
179178
run-make/pretty-print-to-file/Makefile
180179
run-make/pretty-print-with-dep-file/Makefile
181180
run-make/print-calling-conventions/Makefile

tests/run-make/prefer-rlib/Makefile

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

tests/run-make/prefer-rlib/rmake.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Check that `foo.rs` prefers to link to `bar` statically, and can be executed even if the `bar`
2+
// library artifacts are removed.
3+
4+
//@ ignore-cross-compile
5+
6+
use run_make_support::{dynamic_lib_name, path, run, rust_lib_name, rustc};
7+
use std::fs::remove_file;
8+
9+
fn main() {
10+
rustc().input("bar.rs").crate_type("dylib").crate_type("rlib").run();
11+
assert!(path(rust_lib_name("bar")).exists());
12+
rustc().input("foo.rs").run();
13+
remove_file(rust_lib_name("bar")).unwrap();
14+
remove_file(dynamic_lib_name("bar")).unwrap();
15+
run("foo");
16+
}

0 commit comments

Comments
 (0)