Skip to content

Commit c2c8e90

Browse files
authored
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).
2 parents 3b6a3eb + 8c8d0db commit c2c8e90

File tree

14 files changed

+43
-32
lines changed

14 files changed

+43
-32
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ run-make/forced-unwind-terminate-pof/Makefile
7171
run-make/foreign-double-unwind/Makefile
7272
run-make/foreign-exceptions/Makefile
7373
run-make/foreign-rust-exceptions/Makefile
74-
run-make/fpic/Makefile
7574
run-make/glibc-staticlib-args/Makefile
7675
run-make/inaccessible-temp-dir/Makefile
7776
run-make/include_bytes_deps/Makefile
@@ -102,7 +101,6 @@ run-make/issue-33329/Makefile
102101
run-make/issue-35164/Makefile
103102
run-make/issue-36710/Makefile
104103
run-make/issue-37839/Makefile
105-
run-make/issue-37893/Makefile
106104
run-make/issue-40535/Makefile
107105
run-make/issue-47384/Makefile
108106
run-make/issue-47551/Makefile
@@ -233,7 +231,6 @@ run-make/share-generics-dylib/Makefile
233231
run-make/short-ice/Makefile
234232
run-make/silly-file-names/Makefile
235233
run-make/simd-ffi/Makefile
236-
run-make/simple-dylib/Makefile
237234
run-make/split-debuginfo/Makefile
238235
run-make/stable-symbol-names/Makefile
239236
run-make/static-dylib-by-default/Makefile

tests/run-make/fpic/Makefile

-11
This file was deleted.

tests/run-make/fpic/hello.rs

-1
This file was deleted.

tests/run-make/issue-37893/Makefile

-5
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// a.rs is a procedural macro crate, on which b.rs and c.rs depend. A now
2+
// patched bug caused a compilation failure if the proc-macro crate was
3+
// initialized with its dependents in this exact order. This test checks
4+
// that compilation succeeds even when initialization is done in this order.
5+
// See https://github.com/rust-lang/rust/issues/37893
6+
7+
//@ ignore-cross-compile
8+
9+
use run_make_support::rustc;
10+
11+
fn main() {
12+
rustc().input("a.rs").run();
13+
rustc().input("b.rs").run();
14+
rustc().input("c.rs").run();
15+
}

tests/run-make/simple-dylib/Makefile

-6
This file was deleted.

tests/run-make/simple-dylib/bar.rs

-1
This file was deleted.

tests/run-make/simple-dylib/foo.rs

-5
This file was deleted.

tests/ui/errors/pic-linker.rs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// `-z text` caused the linker to error if there were any non-position-independent
2+
// code (PIC) sections. This test checks that this no longer happens.
3+
// See https://github.com/rust-lang/rust/pull/39803
4+
5+
//@ ignore-windows
6+
//@ ignore-macos
7+
//@ ignore-cross-compile
8+
9+
//@ compile-flags: -Clink-args=-Wl,-z,text
10+
//@ run-pass
11+
12+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
//@ compile-flags: -Cprefer-dynamic
2+
3+
#![crate_type = "dylib"]
4+
pub fn bar() {}
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// A simple test, where foo.rs has a dependency
2+
// on the dynamic library simple-dylib.rs. If the test passes,
3+
// dylibs can be built and linked into another file successfully..
4+
5+
//@ aux-crate:bar=simple-dylib.rs
6+
//@ run-pass
7+
8+
extern crate bar;
9+
10+
fn main() {
11+
bar::bar();
12+
}

0 commit comments

Comments
 (0)