summaryrefslogtreecommitdiffstats
path: root/src/test/run-make-fulldeps/issue-28595
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/run-make-fulldeps/issue-28595')
-rw-r--r--src/test/run-make-fulldeps/issue-28595/Makefile6
-rw-r--r--src/test/run-make-fulldeps/issue-28595/a.c1
-rw-r--r--src/test/run-make-fulldeps/issue-28595/a.rs6
-rw-r--r--src/test/run-make-fulldeps/issue-28595/b.c5
-rw-r--r--src/test/run-make-fulldeps/issue-28595/b.rs12
5 files changed, 30 insertions, 0 deletions
diff --git a/src/test/run-make-fulldeps/issue-28595/Makefile b/src/test/run-make-fulldeps/issue-28595/Makefile
new file mode 100644
index 000000000..61e9d0c65
--- /dev/null
+++ b/src/test/run-make-fulldeps/issue-28595/Makefile
@@ -0,0 +1,6 @@
+-include ../tools.mk
+
+all: $(call NATIVE_STATICLIB,a) $(call NATIVE_STATICLIB,b)
+ $(RUSTC) a.rs
+ $(RUSTC) b.rs
+ $(call RUN,b)
diff --git a/src/test/run-make-fulldeps/issue-28595/a.c b/src/test/run-make-fulldeps/issue-28595/a.c
new file mode 100644
index 000000000..7bfd83cca
--- /dev/null
+++ b/src/test/run-make-fulldeps/issue-28595/a.c
@@ -0,0 +1 @@
+void a(void) {}
diff --git a/src/test/run-make-fulldeps/issue-28595/a.rs b/src/test/run-make-fulldeps/issue-28595/a.rs
new file mode 100644
index 000000000..07863cf64
--- /dev/null
+++ b/src/test/run-make-fulldeps/issue-28595/a.rs
@@ -0,0 +1,6 @@
+#![crate_type = "rlib"]
+
+#[link(name = "a", kind = "static")]
+extern "C" {
+ pub fn a();
+}
diff --git a/src/test/run-make-fulldeps/issue-28595/b.c b/src/test/run-make-fulldeps/issue-28595/b.c
new file mode 100644
index 000000000..6aecb5f9e
--- /dev/null
+++ b/src/test/run-make-fulldeps/issue-28595/b.c
@@ -0,0 +1,5 @@
+extern void a(void);
+
+void b(void) {
+ a();
+}
diff --git a/src/test/run-make-fulldeps/issue-28595/b.rs b/src/test/run-make-fulldeps/issue-28595/b.rs
new file mode 100644
index 000000000..1f389859f
--- /dev/null
+++ b/src/test/run-make-fulldeps/issue-28595/b.rs
@@ -0,0 +1,12 @@
+extern crate a;
+
+#[link(name = "b", kind = "static")]
+extern "C" {
+ pub fn b();
+}
+
+fn main() {
+ unsafe {
+ b();
+ }
+}