on iko/ghcjs-patch-master help sign in
Add enableDWARF and useLLVM
commitdc44dbcfe57bc66946192fa3fffdf426431798ea authorMoritz Angermann <moritz.angermann@gmail.com> dateMon 25 May 2020, 04:33 (6 years ago) parent3e7fde0
3 files changed+11
builder/comp-builder.nix+8 compiler/ghc/default.nix+1 overlays/bootstrap.nix+2
builder/comp-builder.nix+8
@@ -61,6 +61,10 @@ let self =
6161
6262# Debug
6363, enableDebugRTS ? false
64+, enableDWARF ? false
65+
66+# LLVM
67+, useLLVM ? ghc.useLLVM
6468}@drvArgs:
6569
6670let
@@ -139,6 +143,10 @@ let
139143 ++ configureFlags
140144 ++ (ghc.extraConfigureFlags or [])
141145 ++ lib.optional enableDebugRTS "--ghc-option=-debug"
146+ ++ lib.optional enableDWARF "--ghc-option=-g"
147+ ++ lib.optionals useLLVM [
148+ "--ghc-option=-fPIC" "--gcc-option=-fPIC"
149+ ]
142150 );
143151
144152 setupGhcOptions = lib.optional (package.ghcOptions != null) '' --ghc-options="${package.ghcOptions}"'';
compiler/ghc/default.nix+1
@@ -305,6 +305,7 @@ stdenv.mkDerivation (rec {
305305
306306 inherit llvmPackages;
307307 inherit enableShared;
308+ inherit useLLVM;
308309
309310 # Our Cabal compiler name
310311 haskellCompilerName = "ghc-${version}";
overlays/bootstrap.nix+2
@@ -362,6 +362,7 @@ in {
362362 # with the current use of env and exact Deps.
363363 (builtins.mapAttrs
364364 (_: v: v // {
365+ useLLVM = false;
365366 isHaskellNixBootCompiler = true;
366367 })
367368 ({
@@ -571,6 +572,7 @@ in {
571572 v.overrideAttrs (drv: {
572573 postInstall = (drv.postInstall or "") + installDeps "";
573574 }) // {
575+ useLLVM = false;
574576 isHaskellNixBootCompiler = true;
575577 }
576578 )