Skip to content

Commit 592a94f

Browse files
committed
rewrite std-core-cycle to rmake
1 parent c4c0897 commit 592a94f

File tree

3 files changed

+28
-18
lines changed

3 files changed

+28
-18
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ run-make/static-dylib-by-default/Makefile
171171
run-make/static-extern-type/Makefile
172172
run-make/staticlib-blank-lib/Makefile
173173
run-make/staticlib-dylib-linkage/Makefile
174-
run-make/std-core-cycle/Makefile
175174
run-make/symbol-mangling-hashed/Makefile
176175
run-make/symbol-visibility/Makefile
177176
run-make/symbols-include-type-name/Makefile

tests/run-make/std-core-cycle/Makefile

-17
This file was deleted.
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// In some cases, linking libraries with GNU used to fail due to how
2+
// `std` and `core` possess a circular dependency with one another, and
3+
// how the linker could not go back through its symbol processing to resolve
4+
// the circular link. #49316 fixed this, and this test reproduces a minimal
5+
// version of one such linking attempt which used to fail.
6+
// See https://github.com/rust-lang/rust/issues/18807
7+
8+
//@ ignore-cross-compile
9+
10+
use run_make_support::{is_darwin, is_windows, rustc};
11+
12+
fn main() {
13+
rustc().input("bar.rs").run();
14+
15+
let mut rustc_foo = rustc();
16+
rustc_foo.input("foo.rs");
17+
let mut rustc_foo_panic = rustc();
18+
rustc_foo_panic.input("foo.rs").panic("abort");
19+
20+
if !is_darwin() && !is_windows() {
21+
rustc_foo.arg("-Clink-args=-Wl,--no-undefined");
22+
rustc_foo_panic.arg("-Clink-args=-Wl,--no-undefined");
23+
}
24+
25+
rustc_foo.run();
26+
rustc_foo_panic.run();
27+
}
28+

0 commit comments

Comments
 (0)