Skip to content
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

Migrate run-make/no-cdylib-as-rdylib to rmake #125104

Merged
merged 1 commit into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
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 @@ -185,7 +185,6 @@ run-make/native-link-modifier-whole-archive/Makefile
run-make/no-alloc-shim/Makefile
run-make/no-builtins-attribute/Makefile
run-make/no-builtins-lto/Makefile
run-make/no-cdylib-as-rdylib/Makefile
run-make/no-duplicate-libs/Makefile
run-make/no-intermediate-extras/Makefile
run-make/obey-crate-type-flag/Makefile
Expand Down
16 changes: 0 additions & 16 deletions tests/run-make/no-cdylib-as-rdylib/Makefile

This file was deleted.

16 changes: 16 additions & 0 deletions tests/run-make/no-cdylib-as-rdylib/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// This test produces an rlib and a cdylib from bar.rs.
// Then, foo.rs attempts to link to the bar library.
// If the test passes, that means rustc favored the rlib and ignored the cdylib.
// If the test fails, that is because the cdylib was picked, which does not export
// any Rust symbols.
// See https://github.com/rust-lang/rust/pull/113695

//@ ignore-cross-compile

use run_make_support::{run, rustc};

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