From 7ce0c8a4fcf35df492e797ed7bd98f0ea63b622b Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Tue, 19 Jan 2021 13:21:00 +0000 Subject: [PATCH] Make MozJPEG builds reproducible I was wondering why MozJPEG produces different Wasm binaries even when nothing is changed. After looking at the binary diffs, I think I have figured & fixed the reason. --- codecs/mozjpeg/Makefile | 5 ++++- codecs/mozjpeg/enc/mozjpeg_enc.wasm | Bin 236148 -> 236147 bytes codecs/mozjpeg/enc/mozjpeg_node_enc.wasm | Bin 236148 -> 236147 bytes 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/codecs/mozjpeg/Makefile b/codecs/mozjpeg/Makefile index 65179d79..bbdd7ade 100644 --- a/codecs/mozjpeg/Makefile +++ b/codecs/mozjpeg/Makefile @@ -46,7 +46,10 @@ $(CODEC_DIR)/Makefile: $(CODEC_DIR)/configure --without-turbojpeg \ --without-simd \ --without-arith-enc \ - --without-arith-dec + --without-arith-dec \ + --with-build-date=squoosh + # ^ If not provided with a dummy value, MozJPEG includes a build date in the + # binary as part of the version string, making binaries different each time. $(CODEC_DIR)/configure: $(CODEC_DIR)/configure.ac cd $(CODEC_DIR) && autoreconf -iv diff --git a/codecs/mozjpeg/enc/mozjpeg_enc.wasm b/codecs/mozjpeg/enc/mozjpeg_enc.wasm index e2f0ea74fdab9c139660e4b87fd5759ae881dc94..6dc8b5b6f0fb01905cc7748fefe6e551c322aa8c 100755 GIT binary patch delta 86 zcmV-c0IC1