[commit: ghc] ghc-8.2: UNREG: ignore -fllvm (Trac #13495) (70530b4)

git at git.haskell.org git at git.haskell.org
Mon Apr 3 02:37:40 UTC 2017


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

On branch  : ghc-8.2
Link       : http://ghc.haskell.org/trac/ghc/changeset/70530b42c41d97a8accd3e8565b4fa31ca80b5d6/ghc

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

commit 70530b42c41d97a8accd3e8565b4fa31ca80b5d6
Author: Sergei Trofimovich <slyfox at gentoo.org>
Date:   Sat Apr 1 10:35:52 2017 +0100

    UNREG: ignore -fllvm (Trac #13495)
    
    Unregisterised GHC can only use C as a target backend
    (option used to be called -fvia-C). -fasm option was
    ignored with a warhing, but not -fllvm.
    
    jms noticed the failure when tried to use quick-cross
    build flavour. quick-cross enables -fllvm in makefile.
    
      "inplace/bin/ghc-stage1" ... -fllvm
      ghc-stage1: panic! (the 'impossible' happened)
        (GHC version 8.0.2 for powerpc-unknown-linux):
              LlvmCodeGen.Ppr: Cross compiling without valid target info.
    
    This change ignores -fllvm as well.
    
    Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
    (cherry picked from commit 74615f412ad3de2910a156ff494bfe5497fada7e)


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

70530b42c41d97a8accd3e8565b4fa31ca80b5d6
 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 c001073..b8255e1 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -5129,7 +5129,7 @@ makeDynFlagsConsistent dflags
     = 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 &&
+ | hscTarget dflags `elem` [HscAsm, HscLlvm] &&
    platformUnregisterised (targetPlatform dflags)
     = loop (dflags { hscTarget = HscC })
            "Compiler unregisterised, so compiling via C"



More information about the ghc-commits mailing list