summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-03-08 22:05:27 +0000
committerIan Lynagh <ian@well-typed.com>2013-03-09 15:39:25 +0000
commit15ce79f2cd040ced580a3fbab9290d9979d6c5a4 (patch)
tree8f14f7e0ba60fe7ad684917f3a8805a7d50641d6
parent7a87dab5d425098a2e05c0ed07bc3885c4396a67 (diff)
downloadhaskell-15ce79f2cd040ced580a3fbab9290d9979d6c5a4.tar.gz
Re-enable a flag-consistency check
I'm not sure why it caused problems before, but it's fine now.
-rw-r--r--compiler/main/DynFlags.hs15
1 files changed, 6 insertions, 9 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 0b78167d19..060619dbf3 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -164,6 +164,7 @@ import Data.Int
import Data.List
import Data.Map (Map)
import qualified Data.Map as Map
+import Data.Maybe
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Word
@@ -1831,20 +1832,16 @@ parseDynamicFlagsFull activeFlags cmdline dflags0 args = do
throwGhcExceptionIO (CmdLineError ("combination not supported: " ++
intercalate "/" (map wayDesc theWays)))
- {-
- TODO: This test doesn't quite work: We don't want to give an error
- when e.g. compiling a C file, only when compiling Haskell files.
- when doingDynamicToo $
- unless (isJust (outputFile dflags4) == isJust (dynOutputFile dflags4)) $
+ whenGeneratingDynamicToo dflags3 $
+ unless (isJust (outputFile dflags3) == isJust (dynOutputFile dflags3)) $
liftIO $ throwGhcExceptionIO $ CmdLineError
"With -dynamic-too, must give -dyno iff giving -o"
- -}
- let (dflags5, consistency_warnings) = makeDynFlagsConsistent dflags4
+ let (dflags4, consistency_warnings) = makeDynFlagsConsistent dflags3
- liftIO $ setUnsafeGlobalDynFlags dflags5
+ liftIO $ setUnsafeGlobalDynFlags dflags4
- return (dflags5, leftover, consistency_warnings ++ sh_warns ++ warns)
+ return (dflags4, leftover, consistency_warnings ++ sh_warns ++ warns)
updateWays :: DynFlags -> DynFlags
updateWays dflags