Skip to content

Commit

Permalink
Unrolled build for rust-lang#125662
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#125662 - Oneirical:more-tests-again, r=jieyouxu

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

Part of rust-lang#121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).
  • Loading branch information
rust-timer committed May 30, 2024
2 parents 23ea77b + 8c8d0db commit ce19d18
Show file tree
Hide file tree
Showing 14 changed files with 43 additions and 32 deletions.
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 @@ -234,7 +232,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.

File renamed without changes.
File renamed without changes.
File renamed without changes.
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.
// 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();
}

0 comments on commit ce19d18

Please sign in to comment.