diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:29 +0000 |
commit | 631cd5845e8de329d0e227aaa707d7ea228b8f8f (patch) | |
tree | a1b87c8f8cad01cf18f7c5f57a08f102771ed303 /tests/run-make/mixing-libs | |
parent | Adding debian version 1.69.0+dfsg1-1. (diff) | |
download | rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.tar.xz rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.zip |
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make/mixing-libs')
-rw-r--r-- | tests/run-make/mixing-libs/Makefile | 10 | ||||
-rw-r--r-- | tests/run-make/mixing-libs/dylib.rs | 4 | ||||
-rw-r--r-- | tests/run-make/mixing-libs/prog.rs | 7 | ||||
-rw-r--r-- | tests/run-make/mixing-libs/rlib.rs | 2 |
4 files changed, 23 insertions, 0 deletions
diff --git a/tests/run-make/mixing-libs/Makefile b/tests/run-make/mixing-libs/Makefile new file mode 100644 index 000000000..e8262b284 --- /dev/null +++ b/tests/run-make/mixing-libs/Makefile @@ -0,0 +1,10 @@ +# ignore-cross-compile +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/mixing-libs/dylib.rs b/tests/run-make/mixing-libs/dylib.rs new file mode 100644 index 000000000..685688750 --- /dev/null +++ b/tests/run-make/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/mixing-libs/prog.rs b/tests/run-make/mixing-libs/prog.rs new file mode 100644 index 000000000..14ce5c951 --- /dev/null +++ b/tests/run-make/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/mixing-libs/rlib.rs b/tests/run-make/mixing-libs/rlib.rs new file mode 100644 index 000000000..96dcd16bb --- /dev/null +++ b/tests/run-make/mixing-libs/rlib.rs @@ -0,0 +1,2 @@ +#![crate_type = "rlib"] +pub fn rlib() {} |