Skip to content

Commit 9e8a7a8

Browse files
authored
Rollup merge of rust-lang#126684 - GuillaumeGomez:migrate-run-make-glibc-staticlib-args, r=Kobzol
Migrate `run-make/glibc-staticlib-args` to `rmake.rs` Part of rust-lang#121876. r? ``@jieyouxu``
2 parents 69e26df + 0c2bfd9 commit 9e8a7a8

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

Diff for: src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ run-make/forced-unwind-terminate-pof/Makefile
5757
run-make/foreign-double-unwind/Makefile
5858
run-make/foreign-exceptions/Makefile
5959
run-make/foreign-rust-exceptions/Makefile
60-
run-make/glibc-staticlib-args/Makefile
6160
run-make/include_bytes_deps/Makefile
6261
run-make/incr-add-rust-src-component/Makefile
6362
run-make/incr-foreign-head-span/Makefile

Diff for: tests/run-make/glibc-staticlib-args/Makefile

-13
This file was deleted.

Diff for: tests/run-make/glibc-staticlib-args/rmake.rs

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// This ensures that std::env::args works in a library called from C on glibc Linux.
2+
3+
//@ only-gnu
4+
//@ only-linux
5+
//@ ignore-cross-compile
6+
7+
use run_make_support::{bin_name, cc, extra_c_flags, extra_cxx_flags, run, rustc, static_lib_name};
8+
9+
fn main() {
10+
rustc().input("library.rs").crate_type("staticlib").run();
11+
cc().input("program.c")
12+
.arg(static_lib_name("library"))
13+
.out_exe("program")
14+
.args(&extra_c_flags())
15+
.args(&extra_cxx_flags())
16+
.run();
17+
run(&bin_name("program"));
18+
}

0 commit comments

Comments
 (0)