Skip to content

Migrate run make prefer rlib #126310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Migrate run-make/prefer-rlib to rmake.rs
  • Loading branch information
GuillaumeGomez committed Jun 12, 2024
commit f2cce98149b78e2880e2e81e03c2cc94ff5a29a5
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-rlib/Makefile
run-make/pretty-print-to-file/Makefile
run-make/pretty-print-with-dep-file/Makefile
run-make/print-calling-conventions/Makefile
Expand Down
9 changes: 0 additions & 9 deletions tests/run-make/prefer-rlib/Makefile

This file was deleted.

16 changes: 16 additions & 0 deletions tests/run-make/prefer-rlib/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// 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, run, rust_lib_name, rustc};
use std::fs::remove_file;

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();
remove_file(rust_lib_name("bar")).unwrap();
remove_file(dynamic_lib_name("bar")).unwrap();
run("foo");
}