Skip to content

Commit 184dcf2

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

File tree

5 files changed

+20
-18
lines changed

5 files changed

+20
-18
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

Lines changed: 0 additions & 1 deletion
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

Lines changed: 0 additions & 12 deletions
This file was deleted.

tests/run-make/allocator-shim-circular-deps/main.rs

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
//@ check-pass
11+
//@ compile-flags: --test
12+
//@ aux-build: my_lib.rs
13+
14+
#[crate_type = "bin"]
15+
16+
extern crate my_lib;
17+
18+
fn main() {
19+
my_lib::do_something();
20+
}

0 commit comments

Comments
 (0)