ghc: Don't strip compilers

To test this I built a version of the compiler with `dontStrip = True`
and the vanilla version. The size of the result is both 1.4gb which
indicates that the stripping doesn't do anything meaningful.

Not stripping means that the debug rts is properly packages as it
contains DWARF information and unused debugging symbols.

Fixes #63511
This commit is contained in:
Matthew Pickering 2019-07-06 10:02:03 +01:00
parent bc9df0f661
commit b1e3d0737a
4 changed files with 16 additions and 0 deletions

View file

@ -230,6 +230,10 @@ stdenv.mkDerivation (rec {
# that in turn causes GHCi to abort
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
# See #63511 - the only unstripped file is the debug rts which isn't meant to
# be stripped.
dontStrip = true;
checkTarget = "test";
doCheck = false; # fails with "testsuite/tests: No such file or directory. Stop."

View file

@ -207,6 +207,10 @@ stdenv.mkDerivation (rec {
# that in turn causes GHCi to abort
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
# See #63511 - the only unstripped file is the debug rts which isn't meant to
# be stripped.
dontStrip = true;
checkTarget = "test";
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";

View file

@ -206,6 +206,10 @@ stdenv.mkDerivation (rec {
# that in turn causes GHCi to abort
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
# See #63511 - the only unstripped file is the debug rts which isn't meant to
# be stripped.
dontStrip = true;
checkTarget = "test";
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";

View file

@ -206,6 +206,10 @@ stdenv.mkDerivation (rec {
# that in turn causes GHCi to abort
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
# See #63511 - the only unstripped file is the debug rts which isn't meant to
# be stripped.
dontStrip = true;
checkTarget = "test";
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";