about summary refs log tree commit diff
path: root/tests/run-make/missing-crate-dependency/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-make/missing-crate-dependency/Makefile')
-rw-r--r--tests/run-make/missing-crate-dependency/Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/run-make/missing-crate-dependency/Makefile b/tests/run-make/missing-crate-dependency/Makefile
new file mode 100644
index 00000000000..7c271ab8a90
--- /dev/null
+++ b/tests/run-make/missing-crate-dependency/Makefile
@@ -0,0 +1,9 @@
+include ../tools.mk
+
+all:
+	$(RUSTC) --crate-type=rlib crateA.rs
+	$(RUSTC) --crate-type=rlib crateB.rs
+	$(call REMOVE_RLIBS,crateA)
+	# Ensure crateC fails to compile since dependency crateA is missing
+	$(RUSTC) crateC.rs 2>&1 | \
+		$(CGREP) 'can'"'"'t find crate for `crateA` which `crateB` depends on'