[commit: ghc] master: Fix build breakage from 9736c042 (f35d621)
git at git.haskell.org
git at git.haskell.org
Mon May 11 12:45:44 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/f35d621de401bea74d42b28ff9a1d8c5d963a92d/ghc
>---------------------------------------------------------------
commit f35d621de401bea74d42b28ff9a1d8c5d963a92d
Author: Austin Seipp <austin at well-typed.com>
Date: Mon May 11 07:45:03 2015 -0500
Fix build breakage from 9736c042
This was a snaffu caused by my in-tree patch actually differing from the
Phab one slightly. Whoops.
Signed-off-by: Austin Seipp <austin at well-typed.com>
>---------------------------------------------------------------
f35d621de401bea74d42b28ff9a1d8c5d963a92d
compiler/main/DynFlags.hs | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index f8f72b1..6e55622 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -2564,11 +2564,11 @@ dynamic_flags = [
, defGhcFlag "fplugin" (hasArg addPluginModuleName)
------ Optimisation flags ------------------------------------------
- , defGhcFlag "O" (noArgM (updOptLevel 1))
+ , defGhcFlag "O" (noArgM (setOptLevel 1))
, defGhcFlag "Onot" (noArgM (\dflags -> do deprecate "Use -O0 instead"
- updOptLevel 0 dflags))
+ setOptLevel 0 dflags))
, defGhcFlag "Odph" (noArgM setDPHOpt)
- , defGhcFlag "O" (optIntSuffixM (\mb_n -> updOptLevel (mb_n `orElse` 1)))
+ , defGhcFlag "O" (optIntSuffixM (\mb_n -> setOptLevel (mb_n `orElse` 1)))
-- If the number is missing, use 1
@@ -3863,6 +3863,9 @@ setObjTarget l = updM set
= return $ dflags { hscTarget = l }
| otherwise = return dflags
+setOptLevel :: Int -> DynFlags -> DynP DynFlags
+setOptLevel n dflags = return (updOptLevel n dflags)
+
checkOptLevel :: Int -> DynFlags -> Either String DynFlags
checkOptLevel n dflags
| hscTarget dflags == HscInterpreted && n > 0
@@ -3877,7 +3880,7 @@ checkOptLevel n dflags
-- -fsimplifier-phases=3 we use an additional simplifier phase for fusion
--
setDPHOpt :: DynFlags -> DynP DynFlags
-setDPHOpt dflags = updOptLevel 2 (dflags { maxSimplIterations = 20
+setDPHOpt dflags = setOptLevel 2 (dflags { maxSimplIterations = 20
, simplPhases = 3
})
More information about the ghc-commits
mailing list