summary refs log tree commit diff
path: root/tests/run-make/c-static-dylib/Makefile
blob: 05da1743c83bac0c33c4b3adf8de0f01c2cb0dc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# This test checks that static Rust linking with C does not encounter any errors, with dynamic dependencies given preference over static.
# See https://github.com/rust-lang/rust/issues/10434

# ignore-cross-compile
include ../tools.mk

all: $(call NATIVE_STATICLIB,cfoo)
	$(RUSTC) foo.rs -C prefer-dynamic
	$(RUSTC) bar.rs
	rm $(call NATIVE_STATICLIB,cfoo)
	$(call RUN,bar)
	$(call REMOVE_DYLIBS,foo)
	$(call FAIL,bar)