windows.mingw_w64: enable stripping

With 0507725 "setup-hooks/strip.sh: run RANLIB on static
archives after stripping" it should now be safe to run strip
on wider range of .a files.

mingw-w64 is a good example where a reference was preserved
to gcc from intermediate stage. Enabling stripping by default
decreases `pkgsCross.mingw32` closure for 20%:

Before:

    $ nix path-info -rsSh $(nix-build -A pkgsCross.mingw32.stdenv)
    ...
    /nix/store/qzhkidff0wxhqf2gi97ng6qismzvpnbp-stdenv-linux 43.6K    1.0G

After:

    $ nix path-info -rsSh $(nix-build -A pkgsCross.mingw32.stdenv)
    ...
    /nix/store/fj4dv1n3sa3jgcb1j3nwn6njsf943n48-stdenv-linux 43.6K  792.4M
This commit is contained in:
Sergei Trofimovich 2022-07-28 21:50:47 +01:00
parent f478386d43
commit d82ce04557

View File

@ -21,7 +21,6 @@ in stdenv.mkDerivation {
enableParallelBuilding = true; enableParallelBuilding = true;
buildInputs = [ windows.mingw_w64_headers ]; buildInputs = [ windows.mingw_w64_headers ];
dontStrip = true;
hardeningDisable = [ "stackprotector" "fortify" ]; hardeningDisable = [ "stackprotector" "fortify" ];
meta = { meta = {