summaryrefslogtreecommitdiffstats
path: root/tests/run-make-fulldeps/issue-15460
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/run-make-fulldeps/issue-15460
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make-fulldeps/issue-15460')
-rw-r--r--tests/run-make-fulldeps/issue-15460/Makefile6
-rw-r--r--tests/run-make-fulldeps/issue-15460/bar.rs4
-rw-r--r--tests/run-make-fulldeps/issue-15460/foo.c6
-rw-r--r--tests/run-make-fulldeps/issue-15460/foo.rs6
4 files changed, 22 insertions, 0 deletions
diff --git a/tests/run-make-fulldeps/issue-15460/Makefile b/tests/run-make-fulldeps/issue-15460/Makefile
new file mode 100644
index 000000000..1648d0c0c
--- /dev/null
+++ b/tests/run-make-fulldeps/issue-15460/Makefile
@@ -0,0 +1,6 @@
+include ../tools.mk
+
+all: $(call NATIVE_STATICLIB,foo)
+ $(RUSTC) foo.rs -C extra-filename=-383hf8 -C prefer-dynamic
+ $(RUSTC) bar.rs
+ $(call RUN,bar)
diff --git a/tests/run-make-fulldeps/issue-15460/bar.rs b/tests/run-make-fulldeps/issue-15460/bar.rs
new file mode 100644
index 000000000..e66aeb6bd
--- /dev/null
+++ b/tests/run-make-fulldeps/issue-15460/bar.rs
@@ -0,0 +1,4 @@
+extern crate foo;
+fn main() {
+ unsafe { foo::foo() }
+}
diff --git a/tests/run-make-fulldeps/issue-15460/foo.c b/tests/run-make-fulldeps/issue-15460/foo.c
new file mode 100644
index 000000000..fdf595b57
--- /dev/null
+++ b/tests/run-make-fulldeps/issue-15460/foo.c
@@ -0,0 +1,6 @@
+// ignore-license
+
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+void foo() {}
diff --git a/tests/run-make-fulldeps/issue-15460/foo.rs b/tests/run-make-fulldeps/issue-15460/foo.rs
new file mode 100644
index 000000000..b4eaa0b31
--- /dev/null
+++ b/tests/run-make-fulldeps/issue-15460/foo.rs
@@ -0,0 +1,6 @@
+#![crate_type = "dylib"]
+
+#[link(name = "foo", kind = "static")]
+extern "C" {
+ pub fn foo();
+}