Add enableDWARF and useLLVM

This commit is contained in:
Moritz Angermann
2020-09-21 07:57:39 +00:00
parent 3e7fde0a2c
commit dc44dbcfe5
3 changed files with 11 additions and 0 deletions
+8
View File
@@ -61,6 +61,10 @@ let self =
# Debug
, enableDebugRTS ? false
, enableDWARF ? false
# LLVM
, useLLVM ? ghc.useLLVM
}@drvArgs:
let
@@ -139,6 +143,10 @@ let
++ configureFlags
++ (ghc.extraConfigureFlags or [])
++ lib.optional enableDebugRTS "--ghc-option=-debug"
++ lib.optional enableDWARF "--ghc-option=-g"
++ lib.optionals useLLVM [
"--ghc-option=-fPIC" "--gcc-option=-fPIC"
]
);
setupGhcOptions = lib.optional (package.ghcOptions != null) '' --ghc-options="${package.ghcOptions}"'';
+1
View File
@@ -305,6 +305,7 @@ stdenv.mkDerivation (rec {
inherit llvmPackages;
inherit enableShared;
inherit useLLVM;
# Our Cabal compiler name
haskellCompilerName = "ghc-${version}";
+2
View File
@@ -362,6 +362,7 @@ in {
# with the current use of env and exact Deps.
(builtins.mapAttrs
(_: v: v // {
useLLVM = false;
isHaskellNixBootCompiler = true;
})
({
@@ -571,6 +572,7 @@ in {
v.overrideAttrs (drv: {
postInstall = (drv.postInstall or "") + installDeps "";
}) // {
useLLVM = false;
isHaskellNixBootCompiler = true;
}
)