fork/rust

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

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

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