summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-03-16 21:35:29 +0000
committerIan Lynagh <ian@well-typed.com>2013-03-16 22:27:39 +0000
commitecc1882ed458210c322d30b78801e7bc0a5c2d4d (patch)
tree8c131560ab9acd7222bed5e542e2c1a8493eba4c /ghc
parent28db4ca8c249afae72deece3e9978a2ec05a02cc (diff)
downloadhaskell-ecc1882ed458210c322d30b78801e7bc0a5c2d4d.tar.gz
Fix the handling of Opt_Static
There were some cases where we weren't unsetting it when turning the Dyn way on.
Diffstat (limited to 'ghc')
-rw-r--r--ghc/Main.hs13
1 files changed, 9 insertions, 4 deletions
diff --git a/ghc/Main.hs b/ghc/Main.hs
index f17f403bc6..35dbf5bf2a 100644
--- a/ghc/Main.hs
+++ b/ghc/Main.hs
@@ -145,10 +145,15 @@ main' postLoadMode dflags0 args flagWarnings = do
let dflags1 = case lang of
HscInterpreted ->
- let interpWayGeneralFlags = concatMap (wayGeneralFlags (targetPlatform dflags0)) interpWays
- in foldl gopt_set
- (updateWays $ dflags0 { ways = interpWays })
- interpWayGeneralFlags
+ let platform = targetPlatform dflags0
+ dflags0a = updateWays $ dflags0 { ways = interpWays }
+ dflags0b = foldl gopt_set dflags0a
+ $ concatMap (wayGeneralFlags platform)
+ interpWays
+ dflags0c = foldl gopt_unset dflags0b
+ $ concatMap (wayUnsetGeneralFlags platform)
+ interpWays
+ in dflags0c
_ ->
dflags0
dflags2 = dflags1{ ghcMode = mode,