rewrite allocator-shim-circular-deps to ui test

This commit is contained in:
Oneirical 2024-06-17 16:11:14 -04:00
parent dfba1b5cca
commit 78998f3fea
4 changed files with 17 additions and 14 deletions

View File

@ -1,4 +1,3 @@
run-make/allocator-shim-circular-deps/Makefile
run-make/archive-duplicate-names/Makefile run-make/archive-duplicate-names/Makefile
run-make/atomic-lock-free/Makefile run-make/atomic-lock-free/Makefile
run-make/branch-protection-check-IBT/Makefile run-make/branch-protection-check-IBT/Makefile

View File

@ -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

View File

@ -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();
}

View File

@ -1,5 +1,5 @@
// The compiler flags no-link (and by extension, link-only) used to be broken // 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. // that these flags are not broken again, resulting in successful compilation.
// See https://github.com/rust-lang/rust/issues/77857 // See https://github.com/rust-lang/rust/issues/77857