Windows: disable timestamps in PE headers

This commit is contained in:
Ștefan Talpalaru 2019-02-17 17:42:04 +01:00 committed by zah
parent a96976cd0a
commit e9565258a6
2 changed files with 9 additions and 3 deletions

View File

@ -131,9 +131,10 @@ test: | build deps
# primitive reproducibility test
test-reproducibility:
+ [ -e build/nimbus ] || $(MAKE) V=0 nimbus; \
MD5SUM1=$$($(MD5SUM) build/nimbus | cut -d ' ' -f 1); \
$(MAKE) V=0 nimbus; \
MD5SUM2=$$($(MD5SUM) build/nimbus | cut -d ' ' -f 1); \
MD5SUM1=$$($(MD5SUM) build/nimbus | cut -d ' ' -f 1) && \
rm -rf nimcache/*/nimbus && \
$(MAKE) V=0 nimbus && \
MD5SUM2=$$($(MD5SUM) build/nimbus | cut -d ' ' -f 1) && \
[ "$$MD5SUM1" = "$$MD5SUM2" ] && echo "Success: identical binaries." || \
{ echo "Failure: the binary changed between builds."; exit 1; }

View File

@ -4,3 +4,8 @@
nimcache = "nimcache/debug/$projectName"
@end
# disable timestamps in Windows PE headers - https://wiki.debian.org/ReproducibleBuilds/TimestampsInPEBinaries
@if windows:
passL = "-Wl,--no-insert-timestamp"
@end