From 4e0e39e7aa1b05b164078db34732b9bc402ec84c Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Tue, 10 Aug 2021 11:46:13 +0100 Subject: recomp: Check backend type rather than -fwrite-interface to decide whether we need any objects This was a small oversight in the original patch which leads to spurious recompilation when using `-fno-code` but not `-fwrite-interface`, which you plausibly might do when using ghci. Fixes #20216 --- compiler/GHC/Driver/Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs index d041d918bb..788c2bce1f 100644 --- a/compiler/GHC/Driver/Main.hs +++ b/compiler/GHC/Driver/Main.hs @@ -703,7 +703,7 @@ hscRecompStatus (recomp_obj_reqd, mb_linkable) <- case () of -- No need for a linkable, we're good to go - _ | writeInterfaceOnlyMode lcl_dflags -> return (UpToDate, Nothing) + _ | NoBackend <- backend lcl_dflags -> return (UpToDate, Nothing) -- Interpreter can use either already loaded bytecode or loaded object code | not (backendProducesObject (backend lcl_dflags)) -> do res <- liftIO $ checkByteCode old_linkable -- cgit v1.2.1