-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
20 additions
and
17 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,20 @@ | ||
// This test checks that C linking with Rust does not encounter any errors, with a static library. | ||
// See https://github.com/rust-lang/rust/issues/10434 | ||
|
||
//@ ignore-cross-compile | ||
|
||
use run_make_support::{cc, extra_c_flags, extra_cxx_flags, run, rustc, static_lib}; | ||
use std::fs; | ||
|
||
fn main() { | ||
rustc().input("foo.rs").run(); | ||
cc().input("bar.c") | ||
.input(static_lib("foo")) | ||
.out_exe("bar") | ||
.args(&extra_c_flags()) | ||
.args(&extra_cxx_flags()) | ||
.run(); | ||
run("bar"); | ||
fs::remove_file(static_lib("foo")); | ||
run("bar"); | ||
} |