summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-10-26 11:12:49 +0100
committerSimon Marlow <marlowsd@gmail.com>2012-11-01 10:13:17 +0000
commit3a6b1bfb08602a8193b0025f0fe47ec8ddf8dad2 (patch)
treee56ceda94fb405c856489d5df44853ca514be687 /mk
parentee43ad528d57f0b31f47e56afdf5211141780239 (diff)
downloadhaskell-3a6b1bfb08602a8193b0025f0fe47ec8ddf8dad2.tar.gz
Turn on -O2 for the RTS by default
Optimisation now makes a difference when compiling .cmm code, because it enables the optimisation passes in CmmPipeline. Recently validate has not been optimising the .cmm code because it uses SRC_HC_OPTS=-O0, which explains why I couldn't reproduce #7366 in validate (the bug miscompiled rts/PrimOps.cmm).
Diffstat (limited to 'mk')
-rw-r--r--mk/config.mk.in8
1 files changed, 5 insertions, 3 deletions
diff --git a/mk/config.mk.in b/mk/config.mk.in
index a906d25fdf..f8d4d6a95f 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -360,9 +360,11 @@ LAX_DEPENDENCIES = NO
# ----------------------------------------------------------------------------
# Options for GHC's RTS
-# For an optimised RTS (you probably don't want to change these; we build
-# a debugging RTS by default now. Use -debug to get it).
-GhcRtsHcOpts=-optc-O2
+# Build an optimised RTS. Remember that we need to turn on
+# optimisation both for C code (-optc-O2) and .cmm code (-O2). For
+# the debugging RTS flavour, rts/ghc.mk overrides these to turn off
+# optimisation.
+GhcRtsHcOpts=-optc-O2 -O2
GhcRtsCcOpts=-fomit-frame-pointer
# Include the front panel code? Needs GTK+.