From 1376c5a617be5c25655d0d7cb63e3beaa5a6e026 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:20:39 +0200 Subject: Merging upstream version 1.70.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/run-make/extern-overrides-distribution/Makefile | 6 ++++++ tests/run-make/extern-overrides-distribution/libc.rs | 3 +++ tests/run-make/extern-overrides-distribution/main.rs | 5 +++++ 3 files changed, 14 insertions(+) create mode 100644 tests/run-make/extern-overrides-distribution/Makefile create mode 100644 tests/run-make/extern-overrides-distribution/libc.rs create mode 100644 tests/run-make/extern-overrides-distribution/main.rs (limited to 'tests/run-make/extern-overrides-distribution') diff --git a/tests/run-make/extern-overrides-distribution/Makefile b/tests/run-make/extern-overrides-distribution/Makefile new file mode 100644 index 000000000..bfd0dd699 --- /dev/null +++ b/tests/run-make/extern-overrides-distribution/Makefile @@ -0,0 +1,6 @@ +# ignore-cross-compile +include ../tools.mk + +all: + $(RUSTC) libc.rs -Cmetadata=foo + $(RUSTC) main.rs --extern libc=$(TMPDIR)/liblibc.rlib diff --git a/tests/run-make/extern-overrides-distribution/libc.rs b/tests/run-make/extern-overrides-distribution/libc.rs new file mode 100644 index 000000000..ee51ae328 --- /dev/null +++ b/tests/run-make/extern-overrides-distribution/libc.rs @@ -0,0 +1,3 @@ +#![crate_type = "lib"] + +pub fn foo() {} diff --git a/tests/run-make/extern-overrides-distribution/main.rs b/tests/run-make/extern-overrides-distribution/main.rs new file mode 100644 index 000000000..1290a8c56 --- /dev/null +++ b/tests/run-make/extern-overrides-distribution/main.rs @@ -0,0 +1,5 @@ +extern crate libc; + +fn main() { + libc::foo(); +} -- cgit v1.2.3