fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
1009 B26 linesraw
1-include ../tools.mk
2
3# ignore-musl
4# ignore-windows
5# Objects are reproducible but their path is not.
6
7all:  \
8	fat_lto \
9	sysroot
10
11fat_lto:
12	rm -rf $(TMPDIR) && mkdir $(TMPDIR)
13	$(RUSTC) reproducible-build-aux.rs
14	$(RUSTC) reproducible-build.rs -C lto=fat
15	cp $(TMPDIR)/reproducible-build $(TMPDIR)/reproducible-build-a
16	$(RUSTC) reproducible-build.rs -C lto=fat
17	cmp "$(TMPDIR)/reproducible-build-a" "$(TMPDIR)/reproducible-build" || exit 1
18
19sysroot:
20	rm -rf $(TMPDIR) && mkdir $(TMPDIR)
21	$(RUSTC) reproducible-build-aux.rs
22	$(RUSTC) reproducible-build.rs --crate-type rlib --sysroot $(shell $(RUSTC) --print sysroot) --remap-path-prefix=$(shell $(RUSTC) --print sysroot)=/sysroot
23	cp -r $(shell $(RUSTC) --print sysroot) $(TMPDIR)/sysroot
24	cp $(TMPDIR)/libreproducible_build.rlib $(TMPDIR)/libfoo.rlib
25	$(RUSTC) reproducible-build.rs --crate-type rlib --sysroot $(TMPDIR)/sysroot --remap-path-prefix=$(TMPDIR)/sysroot=/sysroot
26	cmp "$(TMPDIR)/libreproducible_build.rlib" "$(TMPDIR)/libfoo.rlib" || exit 1