diff options
| author | fee1-dead <ent3rm4n@gmail.com> | 2024-06-19 22:51:06 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-19 22:51:06 +0800 |
| commit | 9e8a7a87e4647907b35299413fcfc8feeabbb205 (patch) | |
| tree | 852057c4144b2ba8337d1a6263fafa51f821bba9 | |
| parent | 69e26df5c4822771f0487e364d995ff1d6889c68 (diff) | |
| parent | 0c2bfd913ed12872e98d02201eb706ce3ffcb013 (diff) | |
| download | rust-9e8a7a87e4647907b35299413fcfc8feeabbb205.tar.gz rust-9e8a7a87e4647907b35299413fcfc8feeabbb205.zip | |
Rollup merge of #126684 - GuillaumeGomez:migrate-run-make-glibc-staticlib-args, r=Kobzol
Migrate `run-make/glibc-staticlib-args` to `rmake.rs` Part of https://github.com/rust-lang/rust/issues/121876. r? ``@jieyouxu``
| -rw-r--r-- | src/tools/tidy/src/allowed_run_make_makefiles.txt | 1 | ||||
| -rw-r--r-- | tests/run-make/glibc-staticlib-args/Makefile | 13 | ||||
| -rw-r--r-- | tests/run-make/glibc-staticlib-args/rmake.rs | 18 |
3 files changed, 18 insertions, 14 deletions
diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index eb2e8c2542e..2b273b92ec2 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -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 diff --git a/tests/run-make/glibc-staticlib-args/Makefile b/tests/run-make/glibc-staticlib-args/Makefile deleted file mode 100644 index cad6c049e45..00000000000 --- a/tests/run-make/glibc-staticlib-args/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# ignore-cross-compile -# only-gnu -# only-linux - -include ../tools.mk - -# This ensures that std::env::args works in a library called from C on glibc Linux. - -all: - $(RUSTC) --crate-type=staticlib library.rs - $(CC) program.c $(call STATICLIB,library) $(call OUT_EXE,program) \ - $(EXTRACFLAGS) $(EXTRACXXFLAGS) - $(call RUN,program) diff --git a/tests/run-make/glibc-staticlib-args/rmake.rs b/tests/run-make/glibc-staticlib-args/rmake.rs new file mode 100644 index 00000000000..8ab10419ab9 --- /dev/null +++ b/tests/run-make/glibc-staticlib-args/rmake.rs @@ -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")); +} |
