diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
commit | 1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch) | |
tree | 3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /tests/run-make/issue-15460 | |
parent | Releasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip |
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make/issue-15460')
-rw-r--r-- | tests/run-make/issue-15460/Makefile | 7 | ||||
-rw-r--r-- | tests/run-make/issue-15460/bar.rs | 4 | ||||
-rw-r--r-- | tests/run-make/issue-15460/foo.c | 6 | ||||
-rw-r--r-- | tests/run-make/issue-15460/foo.rs | 6 |
4 files changed, 23 insertions, 0 deletions
diff --git a/tests/run-make/issue-15460/Makefile b/tests/run-make/issue-15460/Makefile new file mode 100644 index 000000000..a36a085fa --- /dev/null +++ b/tests/run-make/issue-15460/Makefile @@ -0,0 +1,7 @@ +# ignore-cross-compile +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/issue-15460/bar.rs b/tests/run-make/issue-15460/bar.rs new file mode 100644 index 000000000..e66aeb6bd --- /dev/null +++ b/tests/run-make/issue-15460/bar.rs @@ -0,0 +1,4 @@ +extern crate foo; +fn main() { + unsafe { foo::foo() } +} diff --git a/tests/run-make/issue-15460/foo.c b/tests/run-make/issue-15460/foo.c new file mode 100644 index 000000000..fdf595b57 --- /dev/null +++ b/tests/run-make/issue-15460/foo.c @@ -0,0 +1,6 @@ +// ignore-license + +#ifdef _WIN32 +__declspec(dllexport) +#endif +void foo() {} diff --git a/tests/run-make/issue-15460/foo.rs b/tests/run-make/issue-15460/foo.rs new file mode 100644 index 000000000..b4eaa0b31 --- /dev/null +++ b/tests/run-make/issue-15460/foo.rs @@ -0,0 +1,6 @@ +#![crate_type = "dylib"] + +#[link(name = "foo", kind = "static")] +extern "C" { + pub fn foo(); +} |