1 include ../../run-make-fulldeps/tools.mk
4 FIRST_SRC=$(TMPDIR)/first_src
5 SECOND_SRC=$(TMPDIR)/second_src
7 # ignore-none no-std is not supported
8 # ignore-nvptx64-nvidia-cuda FIXME: can't find crate for 'std'
10 # Tests that we don't get an ICE when the working directory
11 # (but not the build directory!) changes between compilation
16 # Build from 'FIRST_SRC'
18 cp my_lib.rs $(FIRST_SRC)/my_lib.rs
19 cp main.rs $(FIRST_SRC)/main.rs
21 $(RUSTC) -C incremental=$(INCR) --crate-type lib my_lib.rs --target $(TARGET) && \
22 $(RUSTC) -C incremental=$(INCR) --extern my_lib=$(TMPDIR)/libmy_lib.rlib main.rs --target $(TARGET)
23 # Build from 'SECOND_SRC', keeping the output directory and incremental directory
25 mv $(FIRST_SRC) $(SECOND_SRC)
27 $(RUSTC) -C incremental=$(INCR) --crate-type lib my_lib.rs --target $(TARGET) && \
28 $(RUSTC) -C incremental=$(INCR) --extern my_lib=$(TMPDIR)/libmy_lib.rlib main.rs --target $(TARGET)