Tom Eccles a143d6d467 run-make: Specify --target to rustc
Resolves #78911

The target's linker was used but rustc wasn't told to build for that
target (instead defaulting to the host). This led to the host instead of
the target getting tested and to the linker getting inappropriate
arguments.
2021-03-28 16:48:48 +01:00

11 lines
227 B
Makefile

include ../../run-make-fulldeps/tools.mk
all: foo
$(call RUN,foo)
foo: foo.rs $(call NATIVE_STATICLIB,foo)
$(RUSTC) $< -lfoo $(EXTRARSCXXFLAGS) --target $(TARGET)
$(TMPDIR)/libfoo.o: foo.cpp
$(call COMPILE_OBJ_CXX,$@,$<)