about summary refs log tree commit diff
diff options
context:
space:
mode:
-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.rs21
3 files changed, 21 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 e87950b36d9..029bb7806db 100644
--- a/src/tools/tidy/src/allowed_run_make_makefiles.txt
+++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt
@@ -12,7 +12,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..d8d0e064c60
--- /dev/null
+++ b/tests/run-make/c-link-to-rust-va-list-fn/rmake.rs
@@ -0,0 +1,21 @@
+// 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");
+}