Commit b5ac19aa authored by ian@well-typed.com's avatar ian@well-typed.com
Browse files

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.
parent 47556a8e
...@@ -3409,7 +3409,7 @@ makeDynFlagsConsistent dflags ...@@ -3409,7 +3409,7 @@ makeDynFlagsConsistent dflags
else let dflags' = dflags { hscTarget = HscLlvm } else let dflags' = dflags { hscTarget = HscLlvm }
warn = "Compiler not unregisterised, so using LLVM rather than compiling via C" warn = "Compiler not unregisterised, so using LLVM rather than compiling via C"
in loop dflags' warn in loop dflags' warn
| hscTarget dflags /= HscC && hscTarget dflags /= HscLlvm && | hscTarget dflags == HscAsm &&
platformUnregisterised (targetPlatform dflags) platformUnregisterised (targetPlatform dflags)
= loop (dflags { hscTarget = HscC }) = loop (dflags { hscTarget = HscC })
"Compiler unregisterised, so compiling via C" "Compiler unregisterised, so compiling via C"
......
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