summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-08-10 11:46:13 +0100
committerMatthew Pickering <matthewtpickering@gmail.com>2021-08-18 09:52:28 +0100
commit4e0e39e7aa1b05b164078db34732b9bc402ec84c (patch)
tree10d34e17da04d141b228fadb90bfb57d2444b45f
parenta7de56b0b9b851369ad0cb8db0e0f580e28910c9 (diff)
downloadhaskell-wip/driver-rework-pt3-clean.tar.gz
recomp: Check backend type rather than -fwrite-interface to decide whether we need any objectswip/driver-rework-pt3-clean
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
-rw-r--r--compiler/GHC/Driver/Main.hs2
1 files changed, 1 insertions, 1 deletions
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