fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1include ../tools.mk 2 3INCR=$(TMPDIR)/incr 4FIRST_SRC=$(TMPDIR)/first_src 5SECOND_SRC=$(TMPDIR)/second_src 6 7# ignore-none no-std is not supported 8# ignore-nvptx64-nvidia-cuda FIXME: can't find crate for 'std' 9 10# Tests that we don't get an ICE when the working directory 11# (but not the build directory!) changes between compilation 12# sessions 13 14all: 15 mkdir $(INCR) 16 # Build from 'FIRST_SRC' 17 mkdir $(FIRST_SRC) 18 cp my_lib.rs $(FIRST_SRC)/my_lib.rs 19 cp main.rs $(FIRST_SRC)/main.rs 20 cd $(FIRST_SRC) && \ 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 24 # the same 25 mv $(FIRST_SRC) $(SECOND_SRC) 26 cd $(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)