diff options
author | David Johnson <djohnson.m@gmail.com> | 2018-12-03 13:46:22 -0500 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2018-12-03 19:46:22 +0100 |
commit | e42d10957d87a5837085cd3273f97e50b67e987d (patch) | |
tree | b25ed9a5c170b5eeb2c1f2a5bba70ab01e06be83 /pkgs/development/haskell-modules/lib.nix | |
parent | 4cf1d88d12ff894968a6a406d6ee62f26f998625 (diff) |
Add disable core optimizations (#51464)
haskell.lib.disableOptimization: new function
Adds a utility function for disabling GHC core optimizations.
Significantly reduces build times.
Diffstat (limited to '')
-rw-r--r-- | pkgs/development/haskell-modules/lib.nix | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/lib.nix b/pkgs/development/haskell-modules/lib.nix index 3d67ac213993..e3b73641989a 100644 --- a/pkgs/development/haskell-modules/lib.nix +++ b/pkgs/development/haskell-modules/lib.nix @@ -259,6 +259,9 @@ rec { */ buildStrictly = pkg: buildFromSdist (failOnAllWarnings pkg); + /* Disable core optimizations, significantly speeds up build time */ + disableOptimization = pkg: appendConfigureFlag pkg "--disable-optimization"; + /* Turn on most of the compiler warnings and fail the build if any of them occur. */ failOnAllWarnings = drv: appendConfigureFlag drv "--ghc-option=-Wall --ghc-option=-Werror"; |