summaryrefslogtreecommitdiffstats
path: root/src/test/run-make-fulldeps/crate-hash-rustc-version
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 /src/test/run-make-fulldeps/crate-hash-rustc-version
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 'src/test/run-make-fulldeps/crate-hash-rustc-version')
-rw-r--r--src/test/run-make-fulldeps/crate-hash-rustc-version/Makefile37
-rw-r--r--src/test/run-make-fulldeps/crate-hash-rustc-version/a.rs4
-rw-r--r--src/test/run-make-fulldeps/crate-hash-rustc-version/b.rs8
3 files changed, 0 insertions, 49 deletions
diff --git a/src/test/run-make-fulldeps/crate-hash-rustc-version/Makefile b/src/test/run-make-fulldeps/crate-hash-rustc-version/Makefile
deleted file mode 100644
index 4f25a865e..000000000
--- a/src/test/run-make-fulldeps/crate-hash-rustc-version/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-include ../../run-make-fulldeps/tools.mk
-
-# Ensure that crates compiled with different rustc versions cannot
-# be dynamically linked.
-
-FLAGS := -Cprefer-dynamic -Zsymbol-mangling-version=v0
-UNAME := $(shell uname)
-ifeq ($(UNAME),Linux)
- EXT=".so"
- NM_CMD := nm -D
-endif
-ifeq ($(UNAME),Darwin)
- EXT=".dylib"
- NM_CMD := nm
-endif
-
-ifndef NM_CMD
-all:
- exit 0
-else
-all:
- # a.rs is a dylib
- $(RUSTC) a.rs --crate-type=dylib $(FLAGS)
- # Write symbols to disk.
- $(NM_CMD) $(call DYLIB,a) > $(TMPDIR)/symbolsbefore
- # b.rs is a binary
- $(RUSTC) b.rs --extern a=$(TMPDIR)/liba$(EXT) --crate-type=bin -Crpath $(FLAGS)
- $(call RUN,b)
- # Now re-compile a.rs with another rustc version
- RUSTC_FORCE_RUSTC_VERSION=deadfeed $(RUSTC) a.rs --crate-type=dylib $(FLAGS)
- # After compiling with a different rustc version, write symbols to disk again.
- $(NM_CMD) $(call DYLIB,a) > $(TMPDIR)/symbolsafter
- # As a sanity check, test if the symbols changed:
- # If the symbols are identical, there's been an error.
- if diff $(TMPDIR)/symbolsbefore $(TMPDIR)/symbolsafter; then exit 1; fi
- $(call FAIL,b)
-endif
diff --git a/src/test/run-make-fulldeps/crate-hash-rustc-version/a.rs b/src/test/run-make-fulldeps/crate-hash-rustc-version/a.rs
deleted file mode 100644
index d65b5ce8e..000000000
--- a/src/test/run-make-fulldeps/crate-hash-rustc-version/a.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-pub fn foo(mut x: String) -> String {
- x.push_str(", world!");
- x
-}
diff --git a/src/test/run-make-fulldeps/crate-hash-rustc-version/b.rs b/src/test/run-make-fulldeps/crate-hash-rustc-version/b.rs
deleted file mode 100644
index 316ac26e7..000000000
--- a/src/test/run-make-fulldeps/crate-hash-rustc-version/b.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-extern crate a;
-
-use a::foo;
-
-fn main() {
- let x = String::from("Hello");
- println!("{}", foo(x));
-}