-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
21 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Having multiple upstream crates available in different formats | ||
// should result in failed compilation. This test causes multiple | ||
// libraries to exist simultaneously as rust libs and dynamic libs, | ||
// causing prog.rs to fail compilation. | ||
// See https://github.com/rust-lang/rust/issues/10434 | ||
|
||
//@ ignore-cross-compile | ||
|
||
use run_make_support::{remove_dylibs, rustc}; | ||
|
||
fn main() { | ||
rustc().input("rlib.rs").crate_type("rlib").crate_type("dylib").run(); | ||
|
||
// Not putting `-C prefer-dynamic` here allows for static linking of librlib.rlib. | ||
rustc().input("dylib.rs").run(); | ||
|
||
// librlib's dynamic version needs to be removed here to prevent prog.rs from fetching | ||
// the wrong one. | ||
remove_dylibs("rlib"); | ||
rustc().input("prog.rs").run_fail(); | ||
} |