-
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.
Rollup merge of #126684 - GuillaumeGomez:migrate-run-make-glibc-stati…
…clib-args, r=Kobzol Migrate `run-make/glibc-staticlib-args` to `rmake.rs` Part of #121876. r? ``@jieyouxu``
- Loading branch information
Showing
3 changed files
with
18 additions
and
14 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,18 @@ | ||
// This ensures that std::env::args works in a library called from C on glibc Linux. | ||
|
||
//@ only-gnu | ||
//@ only-linux | ||
//@ ignore-cross-compile | ||
|
||
use run_make_support::{bin_name, cc, extra_c_flags, extra_cxx_flags, run, rustc, static_lib_name}; | ||
|
||
fn main() { | ||
rustc().input("library.rs").crate_type("staticlib").run(); | ||
cc().input("program.c") | ||
.arg(static_lib_name("library")) | ||
.out_exe("program") | ||
.args(&extra_c_flags()) | ||
.args(&extra_cxx_flags()) | ||
.run(); | ||
run(&bin_name("program")); | ||
} |