mirror of
https://github.com/simplex-chat/haskell.nix.git
synced 2026-06-03 09:17:32 +00:00
Add enableDWARF and useLLVM
This commit is contained in:
@@ -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}"'';
|
||||
|
||||
@@ -305,6 +305,7 @@ stdenv.mkDerivation (rec {
|
||||
|
||||
inherit llvmPackages;
|
||||
inherit enableShared;
|
||||
inherit useLLVM;
|
||||
|
||||
# Our Cabal compiler name
|
||||
haskellCompilerName = "ghc-${version}";
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user