Skip to content

Commit e37c423

Browse files
authored
Rollup merge of rust-lang#126174 - GuillaumeGomez:migrate-run-make-prefer-dylib, r=jieyouxu
Migrate `tests/run-make/prefer-dylib` to `rmake.rs` Part of rust-lang#121876. r? ```@jieyouxu```
2 parents 12358a7 + 19a2dfe commit e37c423

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

Diff for: src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
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-dylib/Makefile
179178
run-make/prefer-rlib/Makefile
180179
run-make/pretty-print-to-file/Makefile
181180
run-make/pretty-print-with-dep-file/Makefile

Diff for: tests/run-make/prefer-dylib/Makefile

-9
This file was deleted.

Diff for: tests/run-make/prefer-dylib/rmake.rs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//@ ignore-cross-compile
2+
3+
use run_make_support::{cwd, dynamic_lib_name, read_dir, run, run_fail, rustc};
4+
use std::fs::remove_file;
5+
use std::process::Command;
6+
7+
fn main() {
8+
rustc().input("bar.rs").crate_type("dylib").crate_type("rlib").arg("-Cprefer-dynamic").run();
9+
rustc().input("foo.rs").arg("-Cprefer-dynamic").run();
10+
11+
run("foo");
12+
13+
remove_file(dynamic_lib_name("bar")).unwrap();
14+
// This time the command should fail.
15+
run_fail("foo");
16+
}

0 commit comments

Comments
 (0)