summaryrefslogtreecommitdiffstats
path: root/tests/run-make-fulldeps/mixing-libs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
commita4b7ed7a42c716ab9f05e351f003d589124fd55d (patch)
treeb620cd3f223850b28716e474e80c58059dca5dd4 /tests/run-make-fulldeps/mixing-libs
parentAdding upstream version 1.67.1+dfsg1. (diff)
downloadrustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz
rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make-fulldeps/mixing-libs')
-rw-r--r--tests/run-make-fulldeps/mixing-libs/Makefile9
-rw-r--r--tests/run-make-fulldeps/mixing-libs/dylib.rs4
-rw-r--r--tests/run-make-fulldeps/mixing-libs/prog.rs7
-rw-r--r--tests/run-make-fulldeps/mixing-libs/rlib.rs2
4 files changed, 22 insertions, 0 deletions
diff --git a/tests/run-make-fulldeps/mixing-libs/Makefile b/tests/run-make-fulldeps/mixing-libs/Makefile
new file mode 100644
index 000000000..39cc0708c
--- /dev/null
+++ b/tests/run-make-fulldeps/mixing-libs/Makefile
@@ -0,0 +1,9 @@
+include ../tools.mk
+
+all:
+ $(RUSTC) rlib.rs
+ $(RUSTC) dylib.rs
+ $(RUSTC) rlib.rs --crate-type=dylib
+ $(RUSTC) dylib.rs
+ $(call REMOVE_DYLIBS,rlib)
+ $(RUSTC) prog.rs && exit 1 || exit 0
diff --git a/tests/run-make-fulldeps/mixing-libs/dylib.rs b/tests/run-make-fulldeps/mixing-libs/dylib.rs
new file mode 100644
index 000000000..685688750
--- /dev/null
+++ b/tests/run-make-fulldeps/mixing-libs/dylib.rs
@@ -0,0 +1,4 @@
+#![crate_type = "dylib"]
+extern crate rlib;
+
+pub fn dylib() { rlib::rlib() }
diff --git a/tests/run-make-fulldeps/mixing-libs/prog.rs b/tests/run-make-fulldeps/mixing-libs/prog.rs
new file mode 100644
index 000000000..14ce5c951
--- /dev/null
+++ b/tests/run-make-fulldeps/mixing-libs/prog.rs
@@ -0,0 +1,7 @@
+extern crate dylib;
+extern crate rlib;
+
+fn main() {
+ dylib::dylib();
+ rlib::rlib();
+}
diff --git a/tests/run-make-fulldeps/mixing-libs/rlib.rs b/tests/run-make-fulldeps/mixing-libs/rlib.rs
new file mode 100644
index 000000000..96dcd16bb
--- /dev/null
+++ b/tests/run-make-fulldeps/mixing-libs/rlib.rs
@@ -0,0 +1,2 @@
+#![crate_type = "rlib"]
+pub fn rlib() {}