diff options
| author | Oneirical <manchot@videotron.ca> | 2024-06-17 16:11:14 -0400 |
|---|---|---|
| committer | Oneirical <manchot@videotron.ca> | 2024-06-18 14:25:59 -0400 |
| commit | 78998f3fea3aba636e50aa0a6abcafa51d66eff7 (patch) | |
| tree | 6d8a5a1b9c40cd48ed62af233e97abea6a7ee9b9 | |
| parent | dfba1b5ccafc490594a8f5a8b99b643279d55945 (diff) | |
| download | rust-78998f3fea3aba636e50aa0a6abcafa51d66eff7.tar.gz rust-78998f3fea3aba636e50aa0a6abcafa51d66eff7.zip | |
rewrite allocator-shim-circular-deps to ui test
| -rw-r--r-- | src/tools/tidy/src/allowed_run_make_makefiles.txt | 1 | ||||
| -rw-r--r-- | tests/run-make/allocator-shim-circular-deps/Makefile | 12 | ||||
| -rw-r--r-- | tests/run-make/allocator-shim-circular-deps/rmake.rs | 16 | ||||
| -rw-r--r-- | tests/run-make/separate-link/rmake.rs | 2 |
4 files changed, 17 insertions, 14 deletions
diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index 8f1d36bb26d..39a567b13a4 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -1,4 +1,3 @@ -run-make/allocator-shim-circular-deps/Makefile run-make/archive-duplicate-names/Makefile run-make/atomic-lock-free/Makefile run-make/branch-protection-check-IBT/Makefile diff --git a/tests/run-make/allocator-shim-circular-deps/Makefile b/tests/run-make/allocator-shim-circular-deps/Makefile deleted file mode 100644 index f667e2e2ec2..00000000000 --- a/tests/run-make/allocator-shim-circular-deps/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# This test is designed to intentionally introduce a circular dependency scenario to check that a specific compiler bug doesn't make a resurgence. -# The bug in question arose when at least one crate required a global allocator, and that crate was placed after the one defining it in the linker order. -# The generated symbols.o should not result in any linker errors. -# See https://github.com/rust-lang/rust/issues/112715 - -# ignore-cross-compile -include ../tools.mk - -all: - rm -rf $(TMPDIR) && mkdir $(TMPDIR) - $(RUSTC) my_lib.rs - $(RUSTC) main.rs --test --extern my_lib=$(TMPDIR)/libmy_lib.rlib diff --git a/tests/run-make/allocator-shim-circular-deps/rmake.rs b/tests/run-make/allocator-shim-circular-deps/rmake.rs new file mode 100644 index 00000000000..7d6b0bd204a --- /dev/null +++ b/tests/run-make/allocator-shim-circular-deps/rmake.rs @@ -0,0 +1,16 @@ +// This test is designed to intentionally introduce a circular dependency scenario to check +// that a specific compiler bug doesn't make a resurgence. +// The bug in question arose when at least one crate +// required a global allocator, and that crate was placed after +// the one defining it in the linker order. +// The generated symbols.o should not result in any linker errors. +// See https://github.com/rust-lang/rust/issues/112715 + +//@ ignore-cross-compile + +use run_make_support::{rust_lib_name, rustc}; + +fn main() { + rustc().input("my_lib.rs").run(); + rustc().input("main.rs").arg("--test").extern_("my_lib", rust_lib_name("my_lib")).run(); +} diff --git a/tests/run-make/separate-link/rmake.rs b/tests/run-make/separate-link/rmake.rs index e063a1e5ab7..e91b25489bc 100644 --- a/tests/run-make/separate-link/rmake.rs +++ b/tests/run-make/separate-link/rmake.rs @@ -1,5 +1,5 @@ // The compiler flags no-link (and by extension, link-only) used to be broken -// due to changes in encoding/decoding. This was patched, and this test ensures +// due to changes in encoding/decoding. This was patched, and this test checks // that these flags are not broken again, resulting in successful compilation. // See https://github.com/rust-lang/rust/issues/77857 |
