summaryrefslogtreecommitdiff
path: root/mk/flavours/validate.mk
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-06-13 16:24:10 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-06-15 23:32:38 -0400
commit76b7f619385ac5d126dd186ff3bfe4cdad9349e7 (patch)
treebee521646ba2811ea09463d06686cdc7e760d018 /mk/flavours/validate.mk
parent20b4d5ecabc59062b7a841ce20b631364d8f8645 (diff)
downloadhaskell-76b7f619385ac5d126dd186ff3bfe4cdad9349e7.tar.gz
Disable optimisation when building Cabal in development flavours
This updates the make and Hadrian build flavours targetting developers to disable optimisation when building the Cabal library. Cabal tends to tickle some very bad compiler performance cases (e.g. #16577) so disabling optimisation here makes a sizeable impact on overall build time. See #16817.
Diffstat (limited to 'mk/flavours/validate.mk')
-rw-r--r--mk/flavours/validate.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/mk/flavours/validate.mk b/mk/flavours/validate.mk
index 3fd916afb0..6395d2d62f 100644
--- a/mk/flavours/validate.mk
+++ b/mk/flavours/validate.mk
@@ -27,6 +27,10 @@ endif
WERROR = -Werror
+# Reduce optimisation when building Cabal; this makes a significant difference
+# in overall build time. See #16817.
+libraries/Cabal_dist-install_HC_OPTS += -O0
+
# DO NOT EDIT THIS FILE! Instead, create a file mk/validate.mk, whose settings
# will override these. See also mk/custom-settings.mk.
#
@@ -36,6 +40,7 @@ WERROR = -Werror
#
#
# Note [validate build settings]
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Using GhcStage2HcOpts=-O (rather than -O0) here bringes my validate down from
# 22mins to 16 mins. Compiling stage2 takes longer, but we gain a faster