about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-05-14 05:35:13 +0000
committerbors <bors@rust-lang.org>2024-05-14 05:35:13 +0000
commit58426f4a5b69d10db1b0ffa017bac25f1b2e801e (patch)
tree48df93a09c13bce61c69eddccc372d2757f8eb52
parentfba5f44bd880b83245f7d30afe55bf745a88cdf0 (diff)
parent812f89728a3a1fbf3979e552fcb888fe6a500c19 (diff)
Auto merge of #125026 - Oneirical:clink-tests, r=jieyouxu
Migrate `run-make/c-link-to-rust-va-list-fn` to `rmake`

Part of #121876.

r? `@jieyouxu`
-rw-r--r--src/tools/tidy/src/allowed_run_make_makefiles.txt1
-rw-r--r--tests/run-make/c-link-to-rust-va-list-fn/Makefile7
-rw-r--r--tests/run-make/c-link-to-rust-va-list-fn/rmake.rs18
3 files changed, 18 insertions, 8 deletions
diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt
index 18a7cb168b3..83a3ea84b24 100644
--- a/src/tools/tidy/src/allowed_run_make_makefiles.txt
+++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt
@@ -9,7 +9,6 @@ run-make/c-dynamic-dylib/Makefile
 run-make/c-dynamic-rlib/Makefile
 run-make/c-link-to-rust-dylib/Makefile
 run-make/c-link-to-rust-staticlib/Makefile
-run-make/c-link-to-rust-va-list-fn/Makefile
 run-make/c-static-dylib/Makefile
 run-make/c-static-rlib/Makefile
 run-make/c-unwind-abi-catch-lib-panic/Makefile
diff --git a/tests/run-make/c-link-to-rust-va-list-fn/Makefile b/tests/run-make/c-link-to-rust-va-list-fn/Makefile
deleted file mode 100644
index 596c0fce3ce..00000000000
--- a/tests/run-make/c-link-to-rust-va-list-fn/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# ignore-cross-compile
-include ../tools.mk
-
-all:
-	$(RUSTC) checkrust.rs
-	$(CC) test.c $(call STATICLIB,checkrust) $(call OUT_EXE,test) $(EXTRACFLAGS)
-	$(call RUN,test)
diff --git a/tests/run-make/c-link-to-rust-va-list-fn/rmake.rs b/tests/run-make/c-link-to-rust-va-list-fn/rmake.rs
new file mode 100644
index 00000000000..7a450efff94
--- /dev/null
+++ b/tests/run-make/c-link-to-rust-va-list-fn/rmake.rs
@@ -0,0 +1,18 @@
+// test.c and its static library checkrust.rs make use of variadic functions (VaList).
+// This test checks that the use of this feature does not
+// prevent the creation of a functional binary.
+// See https://github.com/rust-lang/rust/pull/49878
+
+//@ ignore-cross-compile
+
+use run_make_support::{cc, extra_c_flags, run, rustc, static_lib};
+
+fn main() {
+    rustc().input("checkrust.rs").run();
+    cc().input("test.c")
+        .input(static_lib("checkrust"))
+        .out_exe("test")
+        .args(&extra_c_flags())
+        .run();
+    run("test");
+}