Skip to content

Commit

Permalink
Unrolled build for rust-lang#126174
Browse files Browse the repository at this point in the history
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```
  • Loading branch information
rust-timer committed Jun 12, 2024
2 parents d0227c6 + 19a2dfe commit e7e1c6e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ run-make/pgo-gen/Makefile
run-make/pgo-indirect-call-promotion/Makefile
run-make/pgo-use/Makefile
run-make/pointer-auth-link-with-c/Makefile
run-make/prefer-dylib/Makefile
run-make/prefer-rlib/Makefile
run-make/pretty-print-to-file/Makefile
run-make/pretty-print-with-dep-file/Makefile
Expand Down
9 changes: 0 additions & 9 deletions tests/run-make/prefer-dylib/Makefile

This file was deleted.

16 changes: 16 additions & 0 deletions tests/run-make/prefer-dylib/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//@ ignore-cross-compile

use run_make_support::{cwd, dynamic_lib_name, read_dir, run, run_fail, rustc};
use std::fs::remove_file;
use std::process::Command;

fn main() {
rustc().input("bar.rs").crate_type("dylib").crate_type("rlib").arg("-Cprefer-dynamic").run();
rustc().input("foo.rs").arg("-Cprefer-dynamic").run();

run("foo");

remove_file(dynamic_lib_name("bar")).unwrap();
// This time the command should fail.
run_fail("foo");
}

0 comments on commit e7e1c6e

Please sign in to comment.