[commit: ghc] master: Re-enable a flag-consistency check (15ce79f)

Ian Lynagh igloo at earth.li
Sat Mar 9 21:02:41 CET 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/15ce79f2cd040ced580a3fbab9290d9979d6c5a4

>---------------------------------------------------------------

commit 15ce79f2cd040ced580a3fbab9290d9979d6c5a4
Author: Ian Lynagh <ian at well-typed.com>
Date:   Fri Mar 8 22:05:27 2013 +0000

    Re-enable a flag-consistency check
    
    I'm not sure why it caused problems before, but it's fine now.

>---------------------------------------------------------------

 compiler/main/DynFlags.hs | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 0b78167..060619d 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





More information about the ghc-commits mailing list