on iko/ghcjs-patch-master help sign in
Add enableDWARF and useLLVM
dc44dbcMoritz Angermann
builder/comp-builder.nix+8
@@ -61,6 +61,10 @@ let self =
61
61
62# Debug
62# Debug
63, enableDebugRTS ? false
63, enableDebugRTS ? false
64+, enableDWARF ? false
65+
66+# LLVM
67+, useLLVM ? ghc.useLLVM
64}@drvArgs:
68}@drvArgs:
65
69
66let
70let
@@ -139,6 +143,10 @@ let
139 ++ configureFlags
143 ++ configureFlags
140 ++ (ghc.extraConfigureFlags or [])
144 ++ (ghc.extraConfigureFlags or [])
141 ++ lib.optional enableDebugRTS "--ghc-option=-debug"
145 ++ 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+ ]
142 );
150 );
143
151
144 setupGhcOptions = lib.optional (package.ghcOptions != null) '' --ghc-options="${package.ghcOptions}"'';
152 setupGhcOptions = lib.optional (package.ghcOptions != null) '' --ghc-options="${package.ghcOptions}"'';
compiler/ghc/default.nix+1
@@ -305,6 +305,7 @@ stdenv.mkDerivation (rec {
305
305
306 inherit llvmPackages;
306 inherit llvmPackages;
307 inherit enableShared;
307 inherit enableShared;
308+ inherit useLLVM;
308
309
309 # Our Cabal compiler name
310 # Our Cabal compiler name
310 haskellCompilerName = "ghc-${version}";
311 haskellCompilerName = "ghc-${version}";
overlays/bootstrap.nix+2
@@ -362,6 +362,7 @@ in {
362 # with the current use of env and exact Deps.
362 # with the current use of env and exact Deps.
363 (builtins.mapAttrs
363 (builtins.mapAttrs
364 (_: v: v // {
364 (_: v: v // {
365+ useLLVM = false;
365 isHaskellNixBootCompiler = true;
366 isHaskellNixBootCompiler = true;
366 })
367 })
367 ({
368 ({
@@ -571,6 +572,7 @@ in {
571 v.overrideAttrs (drv: {
572 v.overrideAttrs (drv: {
572 postInstall = (drv.postInstall or "") + installDeps "";
573 postInstall = (drv.postInstall or "") + installDeps "";
573 }) // {
574 }) // {
575+ useLLVM = false;
574 isHaskellNixBootCompiler = true;
576 isHaskellNixBootCompiler = true;
575 }
577 }
576 )
578 )