2023-03-30 08:46:31 -05:00
|
|
|
# ignore-cross-compile
|
2023-03-30 07:58:50 -05:00
|
|
|
include ../tools.mk
|
2022-06-06 11:39:58 -05:00
|
|
|
|
2022-09-16 12:26:22 -05:00
|
|
|
# ignore-msvc
|
|
|
|
|
2022-06-06 11:39:58 -05:00
|
|
|
# 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)
|