Skip to content

Commit 78998f3

Browse files
committed
rewrite allocator-shim-circular-deps to ui test
1 parent dfba1b5 commit 78998f3

File tree

4 files changed

+17
-14
lines changed

4 files changed

+17
-14
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
run-make/allocator-shim-circular-deps/Makefile
21
run-make/archive-duplicate-names/Makefile
32
run-make/atomic-lock-free/Makefile
43
run-make/branch-protection-check-IBT/Makefile

tests/run-make/allocator-shim-circular-deps/Makefile

-12
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// This test is designed to intentionally introduce a circular dependency scenario to check
2+
// that a specific compiler bug doesn't make a resurgence.
3+
// The bug in question arose when at least one crate
4+
// required a global allocator, and that crate was placed after
5+
// the one defining it in the linker order.
6+
// The generated symbols.o should not result in any linker errors.
7+
// See https://github.com/rust-lang/rust/issues/112715
8+
9+
//@ ignore-cross-compile
10+
11+
use run_make_support::{rust_lib_name, rustc};
12+
13+
fn main() {
14+
rustc().input("my_lib.rs").run();
15+
rustc().input("main.rs").arg("--test").extern_("my_lib", rust_lib_name("my_lib")).run();
16+
}

tests/run-make/separate-link/rmake.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// The compiler flags no-link (and by extension, link-only) used to be broken
2-
// due to changes in encoding/decoding. This was patched, and this test ensures
2+
// due to changes in encoding/decoding. This was patched, and this test checks
33
// that these flags are not broken again, resulting in successful compilation.
44
// See https://github.com/rust-lang/rust/issues/77857
55

0 commit comments

Comments
 (0)