summaryrefslogtreecommitdiffstats
path: root/src/test/run-make-fulldeps/incr-add-rust-src-component
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /src/test/run-make-fulldeps/incr-add-rust-src-component
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.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/incr-add-rust-src-component')
-rw-r--r--src/test/run-make-fulldeps/incr-add-rust-src-component/Makefile44
-rw-r--r--src/test/run-make-fulldeps/incr-add-rust-src-component/main.rs3
2 files changed, 0 insertions, 47 deletions
diff --git a/src/test/run-make-fulldeps/incr-add-rust-src-component/Makefile b/src/test/run-make-fulldeps/incr-add-rust-src-component/Makefile
deleted file mode 100644
index 5c1d953cc..000000000
--- a/src/test/run-make-fulldeps/incr-add-rust-src-component/Makefile
+++ /dev/null
@@ -1,44 +0,0 @@
-include ../tools.mk
-
-# rust-lang/rust#70924: Test that if we add rust-src component in between two
-# incremental compiles, the compiler does not ICE on the second.
-
-# This test uses `ln -s` rather than copying to save testing time, but its
-# usage doesn't work on windows. So ignore windows.
-
-# ignore-windows
-
-SYSROOT:=$(shell $(RUSTC) --print sysroot)
-FAKEROOT=$(TMPDIR)/fakeroot
-INCR=$(TMPDIR)/incr
-
-# Make a local copy of the sysroot; then remove the rust-src part of it, if
-# present, for the *first* build. Then put in a facsimile of the rust-src
-# component for the second build, in order to expose the ICE from issue #70924.
-#
-# Note that it is much easier to just do `cp -a $(SYSROOT)/* $(FAKEROOT)` as a
-# first step, but I am concerned that would be too expensive in a unit test
-# compared to making symbolic links.
-#
-# Anyway, the pattern you'll see here is: For every prefix in
-# root/lib/rustlib/src, link all of prefix parent content, then remove the
-# prefix, then loop on the next prefix. This way, we basically create a copy of
-# the context around root/lib/rustlib/src, and can freely add/remove the src
-# component itself.
-all:
- mkdir $(FAKEROOT)
- ln -s $(SYSROOT)/* $(FAKEROOT)
- rm -f $(FAKEROOT)/lib
- mkdir $(FAKEROOT)/lib
- ln -s $(SYSROOT)/lib/* $(FAKEROOT)/lib
- rm -f $(FAKEROOT)/lib/rustlib
- mkdir $(FAKEROOT)/lib/rustlib
- ln -s $(SYSROOT)/lib/rustlib/* $(FAKEROOT)/lib/rustlib
- rm -f $(FAKEROOT)/lib/rustlib/src
- mkdir $(FAKEROOT)/lib/rustlib/src
- ln -s $(SYSROOT)/lib/rustlib/src/* $(FAKEROOT)/lib/rustlib/src
- rm -f $(FAKEROOT)/lib/rustlib/src/rust
- $(RUSTC) --sysroot $(FAKEROOT) -C incremental=$(INCR) main.rs
- mkdir -p $(FAKEROOT)/lib/rustlib/src/rust/src/libstd
- touch $(FAKEROOT)/lib/rustlib/src/rust/src/libstd/lib.rs
- $(RUSTC) --sysroot $(FAKEROOT) -C incremental=$(INCR) main.rs
diff --git a/src/test/run-make-fulldeps/incr-add-rust-src-component/main.rs b/src/test/run-make-fulldeps/incr-add-rust-src-component/main.rs
deleted file mode 100644
index f6320bcb0..000000000
--- a/src/test/run-make-fulldeps/incr-add-rust-src-component/main.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-fn main() {
- println!("Hello World");
-}