Commit f35d621d authored by Austin Seipp's avatar Austin Seipp

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: default avatarAustin Seipp <austin@well-typed.com>
parent 24707d72
......@@ -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
})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment