File tree Expand file tree Collapse file tree 3 files changed +28
-18
lines changed
tests/run-make/std-core-cycle Expand file tree Collapse file tree 3 files changed +28
-18
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,6 @@ run-make/static-dylib-by-default/Makefile
142142run-make/static-extern-type/Makefile
143143run-make/staticlib-blank-lib/Makefile
144144run-make/staticlib-dylib-linkage/Makefile
145- run-make/std-core-cycle/Makefile
146145run-make/symbol-mangling-hashed/Makefile
147146run-make/symbol-visibility/Makefile
148147run-make/symbols-include-type-name/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 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+
You can’t perform that action at this time.
0 commit comments