Commit d2dd5af4 authored by Ben Gamari's avatar Ben Gamari 🐢

DynFlags: Prohibit hpc and byte-code interpreter

The user's guide says hpc is incompatible with GHCi and #9903 would
agree. Fixes #9903.
parent 8c5b087b
......@@ -4179,6 +4179,10 @@ makeDynFlagsConsistent dflags
else let dflags' = dflags { hscTarget = HscLlvm }
warn = "Compiler not unregisterised, so using LLVM rather than compiling via C"
in loop dflags' warn
| gopt Opt_Hpc dflags && hscTarget dflags == HscInterpreted
= let dflags' = gopt_unset dflags Opt_Hpc
warn = "Hpc can't be used with byte-code interpreter. Ignoring -fhpc."
in loop dflags' warn
| hscTarget dflags == HscAsm &&
platformUnregisterised (targetPlatform dflags)
= loop (dflags { hscTarget = HscC })
......
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