ghc: compile with DWARF support by default
This allows our GHCs to build programs with DWARF debug information when -g is passed, see https://ghc.haskell.org/trac/ghc/wiki/DWARF. Compiling with debug symbols is off by default until GHC ticket #15960 (Using -g causes differences in generated core) is fixed.
This commit is contained in:
committed by
Peter Simons
parent
f2bf25e53a
commit
f4316473d9
@@ -7,6 +7,8 @@
|
||||
|
||||
, libiconv ? null, ncurses
|
||||
|
||||
, enableDwarf ? !stdenv.isDarwin, elfutils # for DWARF support
|
||||
|
||||
, useLLVM ? !stdenv.targetPlatform.isx86
|
||||
, # LLVM is conceptually a run-time-only depedendency, but for
|
||||
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
|
||||
@@ -73,7 +75,8 @@ let
|
||||
# Splicer will pull out correct variations
|
||||
libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
|
||||
++ stdenv.lib.optional (!enableIntegerSimple) gmp
|
||||
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
|
||||
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv
|
||||
++ stdenv.lib.optional enableDwarf elfutils;
|
||||
|
||||
toolsForTarget = [
|
||||
pkgsBuildTarget.targetPackages.stdenv.cc
|
||||
@@ -176,6 +179,8 @@ stdenv.mkDerivation (rec {
|
||||
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
|
||||
] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
|
||||
"--disable-large-address-space"
|
||||
] ++ stdenv.lib.optional enableDwarf [
|
||||
"--enable-dwarf-unwind"
|
||||
];
|
||||
|
||||
# Make sure we never relax`$PATH` and hooks support for compatability.
|
||||
|
||||
Reference in New Issue
Block a user