summaryrefslogtreecommitdiffstats
path: root/tests/run-make/issue-97463-abi-param-passing/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-make/issue-97463-abi-param-passing/Makefile')
-rw-r--r--tests/run-make/issue-97463-abi-param-passing/Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/run-make/issue-97463-abi-param-passing/Makefile b/tests/run-make/issue-97463-abi-param-passing/Makefile
new file mode 100644
index 000000000..7ce7aaeec
--- /dev/null
+++ b/tests/run-make/issue-97463-abi-param-passing/Makefile
@@ -0,0 +1,15 @@
+# ignore-cross-compile
+include ../tools.mk
+
+# ignore-msvc
+
+# The issue exercised by this test, rust-lang/rust#97463, explicitly needs `-O`
+# flags (like `-O3`) to reproduce. Thus, we call $(CC) instead of nicer
+# alternatives provided by tools.mk like using `COMPILE_OBJ` or using a
+# `NATIVE_STATICLIB` dependency.
+
+all:
+ $(CC) -c -O3 -o $(TMPDIR)/bad.o bad.c
+ $(AR) rcs $(TMPDIR)/libbad.a $(TMPDIR)/bad.o
+ $(RUSTC) param_passing.rs -L$(TMPDIR) -lbad -C opt-level=3
+ $(call RUN,param_passing)