]> git.lizzy.rs Git - rust.git/blob - tests/run-make/incr-foreign-head-span/Makefile
Rollup merge of #96763 - Abdur-rahmaanJ:patch-1, r=Mark-Simulacrum
[rust.git] / tests / run-make / incr-foreign-head-span / Makefile
1 include ../../run-make-fulldeps/tools.mk
2
3 # ignore-none no-std is not supported
4 # ignore-nvptx64-nvidia-cuda FIXME: can't find crate for 'std'
5
6 # Ensure that modifying a crate on disk (without recompiling it)
7 # does not cause ICEs in downstream crates.
8 # Previously, we would call `SourceMap.guess_head_span` on a span
9 # from an external crate, which would cause us to read an upstream
10 # source file from disk during compilation of a downstream crate
11 # See #86480 for more details
12
13 INCR=$(TMPDIR)/incr
14
15 all:
16         cp first_crate.rs second_crate.rs $(TMPDIR)
17         $(RUSTC) $(TMPDIR)/first_crate.rs  -C incremental=$(INCR) --target $(TARGET) --crate-type lib
18         $(RUSTC) $(TMPDIR)/second_crate.rs -C incremental=$(INCR) --target $(TARGET)  --extern first-crate=$(TMPDIR) --crate-type lib
19         rm $(TMPDIR)/first_crate.rs
20         $(RUSTC) $(TMPDIR)/second_crate.rs  -C incremental=$(INCR) --target $(TARGET) --cfg second_run --crate-type lib
21