[commit: ghc] master: DynFlags: Prohibit hpc and byte-code interpreter (d2dd5af)

git at git.haskell.org git at git.haskell.org
Thu Aug 13 19:05:58 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/d2dd5af433be80464883735f133f3e4dea9c8bd4/ghc

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

commit d2dd5af433be80464883735f133f3e4dea9c8bd4
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Thu Aug 13 20:17:06 2015 +0200

    DynFlags: Prohibit hpc and byte-code interpreter
    
    The user's guide says hpc is incompatible with GHCi and #9903 would
    agree. Fixes #9903.


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

d2dd5af433be80464883735f133f3e4dea9c8bd4
 compiler/main/DynFlags.hs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 4f0bfc5..5fa62b4 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -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 })



More information about the ghc-commits mailing list