From 9ad03683db10e4c631ac70f32c4ef3b5bb594820 Mon Sep 17 00:00:00 2001 From: Christopher Wellons Date: Tue, 20 Oct 2026 11:39:56 -0400 Subject: [PATCH] Strip makensis NSIS links makensis with -s only if a test program so linked runs, which a cross build cannot do, so makensis.exe shipped with its symbol table and DWARF from its libraries. Strip it after install, as with vimrun.exe. Nothing else NSIS installs carried symbols, and the stubs and plugins are unchanged. makensis.exe shrinks from 1,536,466 to 835,072 bytes in the x64 kit, and from 1,414,912 to 889,856 bytes in the x86 kit. Its loaded sections are unchanged, and it produces byte-identical installers. Co-Authored-By: Claude Opus 5.5 --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fda2c7e..67209b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1074,6 +1074,8 @@ FROM cross AS build-nsis COPY --from=dl-nsis /dl/nsis /dl/nsis COPY src/nsis/ $PREFIX/src/nsis/ WORKDIR /dl/nsis +# NSIS links makensis with -s only if a test program so linked runs, +# which cannot happen when cross-compiling, so strip it after install. RUN QUILT_PATCHES=$PREFIX/src/nsis quilt push -a \ && rm -rf .pc \ && scons -j$(nproc) \ @@ -1088,7 +1090,8 @@ RUN QUILT_PATCHES=$PREFIX/src/nsis quilt push -a \ SKIPUTILS="NSIS Menu,Makensisw,VPatch/Source/GenPat,MakeLangId,zip2exe" \ ZLIB_W32=/deps \ install-compiler install-stubs install-includes install-plugins \ - install-contrib install-utils + install-contrib install-utils \ + && $ARCH-strip /out$PREFIX/share/nsis/bin/makensis.exe # Also provide x86 stubs and plugins in the multilib kit so makensis # can produce 32-bit installers ("Target x86-unicode"). NSIS never