File tree 3 files changed +28
-18
lines changed
tests/run-make/std-core-cycle
3 files changed +28
-18
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,6 @@ run-make/static-dylib-by-default/Makefile
171
171
run-make/static-extern-type/Makefile
172
172
run-make/staticlib-blank-lib/Makefile
173
173
run-make/staticlib-dylib-linkage/Makefile
174
- run-make/std-core-cycle/Makefile
175
174
run-make/symbol-mangling-hashed/Makefile
176
175
run-make/symbol-visibility/Makefile
177
176
run-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