[commit: ghc] master: Fix the dynflags consistency code (b5ac19a)

Ian Lynagh igloo at earth.li
Tue Apr 16 16:13:40 CEST 2013


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

On branch  : master

https://github.com/ghc/ghc/commit/b5ac19aa948864642de618367e09e3a751fff696

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

commit b5ac19aa948864642de618367e09e3a751fff696
Author: Ian Lynagh <ian at well-typed.com>
Date:   Mon Apr 15 11:22:32 2013 +0100

    Fix the dynflags consistency code
    
    It was checking to see whether the hscTarget is HscC or HscLlvm, and
    changing it to HscC otherwise. But this meant that as well as rejecting
    HscAsm, it also rejected HscInterpreted and HscNothing.
    
    Now we just check whether it's HscAsm.

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

 compiler/main/DynFlags.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 24c573b..6ddf214 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -3409,7 +3409,7 @@ makeDynFlagsConsistent dflags
       else let dflags' = dflags { hscTarget = HscLlvm }
                warn = "Compiler not unregisterised, so using LLVM rather than compiling via C"
            in loop dflags' warn
- | hscTarget dflags /= HscC && hscTarget dflags /= HscLlvm &&
+ | hscTarget dflags == HscAsm &&
    platformUnregisterised (targetPlatform dflags)
     = loop (dflags { hscTarget = HscC })
            "Compiler unregisterised, so compiling via C"





More information about the ghc-commits mailing list