gecko-dev/build/win32/nsis-no-insert-timestamp.patch
Tom Ritter ab97c8e874 Bug 1612424 - Patch nsis to call lld with --no-insert-timestamp r=froydnj
Adding --no-insert-timestamp to APPEND_LINKFLAGS for nsis is not working as it
is used for both the host and cross-compiled parts, but this option is
only valid for the Windows linker. Therefore we add it using a patch
to the cross-compilation part only.

Differential Revision: https://phabricator.services.mozilla.com/D61321

--HG--
extra : moz-landing-system : lando
2020-01-31 08:30:46 +00:00

28 lines
1.4 KiB
Diff

diff -ur nsis-3.03-src/SCons/Config/gnu nsis-3.03-src.n/SCons/Config/gnu
--- nsis-3.03-src/SCons/Config/gnu 2017-10-06 15:30:20.000000000 -0400
+++ nsis-3.03-src.n/SCons/Config/gnu 2018-06-17 13:26:05.945495151 -0400
@@ -102,6 +102,7 @@
stub_env.Append(LINKFLAGS = ['$NODEFLIBS_FLAG']) # no standard libraries
stub_env.Append(LINKFLAGS = ['$ALIGN_FLAG']) # 512 bytes align
stub_env.Append(LINKFLAGS = ['$MAP_FLAG']) # generate map file
+stub_env.Append(LINKFLAGS = ['-Wl,--no-insert-timestamp']) # remove timestamps for reproducible builds
stub_uenv = stub_env.Clone()
stub_uenv.Append(CPPDEFINES = ['_UNICODE', 'UNICODE'])
@@ -142,6 +143,7 @@
plugin_env.Append(LINKFLAGS = ['$MAP_FLAG']) # generate map file
plugin_env.Append(LINKFLAGS = ['-static-libgcc']) # remove libgcc*.dll dependency
plugin_env.Append(LINKFLAGS = ['-static-libstdc++']) # remove libstdc++*.dll dependency
+plugin_env.Append(LINKFLAGS = ['-Wl,--no-insert-timestamp']) # remove timestamps for reproducible builds
plugin_uenv = plugin_env.Clone()
plugin_uenv.Append(CPPDEFINES = ['_UNICODE', 'UNICODE'])
@@ -181,6 +183,7 @@
util_env.Append(LINKFLAGS = ['-mwindows']) # build windows executables
util_env.Append(LINKFLAGS = ['$ALIGN_FLAG']) # 512 bytes align
+util_env.Append(LINKFLAGS = ['-Wl,--no-insert-timestamp']) # remove timestamps for reproducible builds
conf = FlagsConfigure(util_env)