-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #125027 - Oneirical:c-test-with-remove, r=jieyouxu
Migrate `run-make/c-link-to-rust-staticlib` to `rmake` Part of #121876. r? `@jieyouxu` try-job: dist-x86_64-freebsd
- Loading branch information
Showing
3 changed files
with
19 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,19 @@ | ||
// 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, 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()) | ||
.run(); | ||
run("bar"); | ||
fs::remove_file(static_lib("foo")); | ||
run("bar"); | ||
} |