summaryrefslogtreecommitdiffstats
path: root/src/test/run-make-fulldeps/cdylib/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/run-make-fulldeps/cdylib/Makefile')
-rw-r--r--src/test/run-make-fulldeps/cdylib/Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/run-make-fulldeps/cdylib/Makefile b/src/test/run-make-fulldeps/cdylib/Makefile
new file mode 100644
index 000000000..47ec762b3
--- /dev/null
+++ b/src/test/run-make-fulldeps/cdylib/Makefile
@@ -0,0 +1,19 @@
+include ../tools.mk
+
+all: $(call RUN_BINFILE,foo)
+ $(call RUN,foo)
+ rm $(call DYLIB,foo)
+ $(RUSTC) foo.rs -C lto
+ $(call RUN,foo)
+
+ifdef IS_MSVC
+$(call RUN_BINFILE,foo): $(call DYLIB,foo)
+ $(CC) $(CFLAGS) foo.c $(TMPDIR)/foo.dll.lib $(call OUT_EXE,foo)
+else
+$(call RUN_BINFILE,foo): $(call DYLIB,foo)
+ $(CC) $(CFLAGS) foo.c -lfoo -o $(call RUN_BINFILE,foo) -L $(TMPDIR)
+endif
+
+$(call DYLIB,foo):
+ $(RUSTC) bar.rs
+ $(RUSTC) foo.rs