Skip to content

Commit

Permalink
Rollup merge of #126684 - GuillaumeGomez:migrate-run-make-glibc-stati…
Browse files Browse the repository at this point in the history
…clib-args, r=Kobzol

Migrate `run-make/glibc-staticlib-args` to `rmake.rs`

Part of #121876.

r? ``@jieyouxu``
  • Loading branch information
fee1-dead authored Jun 19, 2024
2 parents 69e26df + 0c2bfd9 commit 9e8a7a8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ run-make/forced-unwind-terminate-pof/Makefile
run-make/foreign-double-unwind/Makefile
run-make/foreign-exceptions/Makefile
run-make/foreign-rust-exceptions/Makefile
run-make/glibc-staticlib-args/Makefile
run-make/include_bytes_deps/Makefile
run-make/incr-add-rust-src-component/Makefile
run-make/incr-foreign-head-span/Makefile
Expand Down
13 changes: 0 additions & 13 deletions tests/run-make/glibc-staticlib-args/Makefile

This file was deleted.

18 changes: 18 additions & 0 deletions tests/run-make/glibc-staticlib-args/rmake.rs
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"));
}

0 comments on commit 9e8a7a8

Please sign in to comment.