]> git.lizzy.rs Git - rust.git/commitdiff
check only that symbol names are deterministic
authorNiko Matsakis <niko@alum.mit.edu>
Tue, 22 Mar 2016 15:54:22 +0000 (11:54 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Fri, 25 Mar 2016 18:07:20 +0000 (14:07 -0400)
Full binary reproducible builds are not possible on all platforms
because linker injects a certain amount of randomness, apparently. Or,
at minimum, they don't work reliably yet.

src/test/run-make/reproducible-build/Makefile

index 7447024ee43b12a52038f0e241ecdf2b4300f105..8e799ca1a430305f784326bbf454088f8f0540d8 100644 (file)
@@ -3,12 +3,18 @@ all:
        $(RUSTC) reproducible-build-aux.rs
        $(RUSTC) reproducible-build.rs -o"$(TMPDIR)/reproducible-build1"
        $(RUSTC) reproducible-build.rs -o"$(TMPDIR)/reproducible-build2"
-       cmp "$(TMPDIR)/reproducible-build1" "$(TMPDIR)/reproducible-build2" || exit 1
+       nm "$(TMPDIR)/reproducible-build1" | sort > "$(TMPDIR)/reproducible-build1.nm"
+       nm "$(TMPDIR)/reproducible-build2" | sort > "$(TMPDIR)/reproducible-build2.nm"
+       cmp "$(TMPDIR)/reproducible-build1.nm" "$(TMPDIR)/reproducible-build2.nm" || exit 1
        $(RUSTC) reproducible-build-aux.rs -g
        $(RUSTC) reproducible-build.rs -g -o"$(TMPDIR)/reproducible-build1-debug"
        $(RUSTC) reproducible-build.rs -g -o"$(TMPDIR)/reproducible-build2-debug"
-       cmp "$(TMPDIR)/reproducible-build1-debug" "$(TMPDIR)/reproducible-build2-debug" || exit 1
+       nm "$(TMPDIR)/reproducible-build1-debug" | sort > "$(TMPDIR)/reproducible-build1-debug.nm"
+       nm "$(TMPDIR)/reproducible-build2-debug" | sort > "$(TMPDIR)/reproducible-build2-debug.nm"
+       cmp "$(TMPDIR)/reproducible-build1-debug.nm" "$(TMPDIR)/reproducible-build2-debug.nm" || exit 1
        $(RUSTC) reproducible-build-aux.rs -O
        $(RUSTC) reproducible-build.rs -O -o"$(TMPDIR)/reproducible-build1-opt"
        $(RUSTC) reproducible-build.rs -O -o"$(TMPDIR)/reproducible-build2-opt"
-       cmp "$(TMPDIR)/reproducible-build1-opt" "$(TMPDIR)/reproducible-build2-opt" || exit 1
+       nm "$(TMPDIR)/reproducible-build1-opt" | sort > "$(TMPDIR)/reproducible-build1-opt.nm"
+       nm "$(TMPDIR)/reproducible-build2-opt" | sort > "$(TMPDIR)/reproducible-build2-opt.nm"
+       cmp "$(TMPDIR)/reproducible-build1-opt.nm" "$(TMPDIR)/reproducible-build2-opt.nm" || exit 1