File tree Expand file tree Collapse file tree 3 files changed +21
-9
lines changed
tests/run-make/mixing-libs Expand file tree Collapse file tree 3 files changed +21
-9
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,6 @@ run-make/manual-link/Makefile
9090run-make/metadata-dep-info/Makefile
9191run-make/min-global-align/Makefile
9292run-make/missing-crate-dependency/Makefile
93- run-make/mixing-libs/Makefile
9493run-make/native-link-modifier-bundle/Makefile
9594run-make/native-link-modifier-whole-archive/Makefile
9695run-make/no-alloc-shim/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ // Having multiple upstream crates available in different formats
2+ // should result in failed compilation. This test causes multiple
3+ // libraries to exist simultaneously as rust libs and dynamic libs,
4+ // causing prog.rs to fail compilation.
5+ // See https://github.com/rust-lang/rust/issues/10434
6+
7+ //@ ignore-cross-compile
8+
9+ use run_make_support:: { remove_dylibs, rustc} ;
10+
11+ fn main ( ) {
12+ rustc ( ) . input ( "rlib.rs" ) . crate_type ( "rlib" ) . crate_type ( "dylib" ) . run ( ) ;
13+
14+ // Not putting `-C prefer-dynamic` here allows for static linking of librlib.rlib.
15+ rustc ( ) . input ( "dylib.rs" ) . run ( ) ;
16+
17+ // librlib's dynamic version needs to be removed here to prevent prog.rs from fetching
18+ // the wrong one.
19+ remove_dylibs ( "rlib" ) ;
20+ rustc ( ) . input ( "prog.rs" ) . run_fail ( ) ;
21+ }
You can’t perform that action at this time.
0 commit comments