Add disable core optimizations (#51464)

haskell.lib.disableOptimization: new function

Adds a utility function for disabling GHC core optimizations.
Significantly reduces build times.
This commit is contained in:
David Johnson 2018-12-03 13:46:22 -05:00 committed by Peter Simons
parent 4cf1d88d12
commit e42d10957d

View file

@ -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";