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

Rewrite fpic, simple-dylib and issue-37893 run-make tests in rmake.rs or ui test format #125662

Merged
merged 3 commits into from
May 30, 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
3 changes: 0 additions & 3 deletions src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ run-make/forced-unwind-terminate-pof/Makefile
run-make/foreign-double-unwind/Makefile
run-make/foreign-exceptions/Makefile
run-make/foreign-rust-exceptions/Makefile
run-make/fpic/Makefile
run-make/glibc-staticlib-args/Makefile
run-make/inaccessible-temp-dir/Makefile
run-make/include_bytes_deps/Makefile
Expand Down Expand Up @@ -103,7 +102,6 @@ run-make/issue-33329/Makefile
run-make/issue-35164/Makefile
run-make/issue-36710/Makefile
run-make/issue-37839/Makefile
run-make/issue-37893/Makefile
run-make/issue-40535/Makefile
run-make/issue-47384/Makefile
run-make/issue-47551/Makefile
Expand Down Expand Up @@ -235,7 +233,6 @@ run-make/share-generics-dylib/Makefile
run-make/short-ice/Makefile
run-make/silly-file-names/Makefile
run-make/simd-ffi/Makefile
run-make/simple-dylib/Makefile
run-make/split-debuginfo/Makefile
run-make/stable-symbol-names/Makefile
run-make/static-dylib-by-default/Makefile
Expand Down
11 changes: 0 additions & 11 deletions tests/run-make/fpic/Makefile

This file was deleted.

1 change: 0 additions & 1 deletion tests/run-make/fpic/hello.rs

This file was deleted.

5 changes: 0 additions & 5 deletions tests/run-make/issue-37893/Makefile

This file was deleted.

15 changes: 15 additions & 0 deletions tests/run-make/proc-macro-init-order/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// a.rs is a procedural macro crate, on which b.rs and c.rs depend. A now
// patched bug caused a compilation failure if the proc-macro crate was
// initialized with its dependents in this exact order. This test checks
// that compilation succeeds even when initialization is done in this order.
Comment on lines +1 to +4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Observation: that sure is some fun combination to diagnose and fix...

// See https://github.com/rust-lang/rust/issues/37893

//@ ignore-cross-compile

use run_make_support::rustc;

fn main() {
rustc().input("a.rs").run();
rustc().input("b.rs").run();
rustc().input("c.rs").run();
}
6 changes: 0 additions & 6 deletions tests/run-make/simple-dylib/Makefile

This file was deleted.

1 change: 0 additions & 1 deletion tests/run-make/simple-dylib/bar.rs

This file was deleted.

5 changes: 0 additions & 5 deletions tests/run-make/simple-dylib/foo.rs

This file was deleted.

12 changes: 12 additions & 0 deletions tests/ui/errors/pic-linker.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// `-z text` caused the linker to error if there were any non-position-independent
// code (PIC) sections. This test checks that this no longer happens.
// See https://github.com/rust-lang/rust/pull/39803

//@ ignore-windows
//@ ignore-macos
//@ ignore-cross-compile

//@ compile-flags: -Clink-args=-Wl,-z,text
//@ run-pass

fn main() {}
4 changes: 4 additions & 0 deletions tests/ui/imports/auxiliary/simple-dylib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
//@ compile-flags: -Cprefer-dynamic

#![crate_type = "dylib"]
pub fn bar() {}
12 changes: 12 additions & 0 deletions tests/ui/imports/simple-dylib-import.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// A simple test, where foo.rs has a dependency
// on the dynamic library simple-dylib.rs. If the test passes,
// dylibs can be built and linked into another file successfully..

//@ aux-crate:bar=simple-dylib.rs
//@ run-pass

extern crate bar;

fn main() {
bar::bar();
}
Loading