rust/tests/run-make/c-link-to-rust-dylib/Makefile
Joshua Nelson 4851d5663c ignore failing cross-compiled run-make tests
`run-make-fulldeps` is never cross-compiled, so a lot of these tests
never accounted for --target. Ignore them when cross-compiling for
now.
2023-03-30 08:46:31 -05:00

19 lines
411 B
Makefile

# ignore-cross-compile
include ../tools.mk
all: $(TMPDIR)/$(call BIN,bar)
$(call RUN,bar)
$(call REMOVE_DYLIBS,foo)
$(call FAIL,bar)
ifdef IS_MSVC
$(TMPDIR)/$(call BIN,bar): $(call DYLIB,foo)
$(CC) bar.c $(TMPDIR)/foo.dll.lib $(call OUT_EXE,bar)
else
$(TMPDIR)/$(call BIN,bar): $(call DYLIB,foo)
$(CC) bar.c -lfoo -o $(call RUN_BINFILE,bar) -L $(TMPDIR)
endif
$(call DYLIB,foo): foo.rs
$(RUSTC) foo.rs