From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/run-make/incr-foreign-head-span/Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/test/run-make/incr-foreign-head-span/Makefile (limited to 'src/test/run-make/incr-foreign-head-span/Makefile') diff --git a/src/test/run-make/incr-foreign-head-span/Makefile b/src/test/run-make/incr-foreign-head-span/Makefile new file mode 100644 index 000000000..712965eaa --- /dev/null +++ b/src/test/run-make/incr-foreign-head-span/Makefile @@ -0,0 +1,21 @@ +include ../../run-make-fulldeps/tools.mk + +# ignore-none no-std is not supported +# ignore-nvptx64-nvidia-cuda FIXME: can't find crate for 'std' + +# Ensure that modifying a crate on disk (without recompiling it) +# does not cause ICEs in downstream crates. +# Previously, we would call `SourceMap.guess_head_span` on a span +# from an external crate, which would cause us to read an upstream +# source file from disk during compilation of a downstream crate +# See #86480 for more details + +INCR=$(TMPDIR)/incr + +all: + cp first_crate.rs second_crate.rs $(TMPDIR) + $(RUSTC) $(TMPDIR)/first_crate.rs -C incremental=$(INCR) --target $(TARGET) --crate-type lib + $(RUSTC) $(TMPDIR)/second_crate.rs -C incremental=$(INCR) --target $(TARGET) --extern first-crate=$(TMPDIR) --crate-type lib + rm $(TMPDIR)/first_crate.rs + $(RUSTC) $(TMPDIR)/second_crate.rs -C incremental=$(INCR) --target $(TARGET) --cfg second_run --crate-type lib + -- cgit v1.2.3