summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-08-10 11:46:13 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-08-18 17:57:42 -0400
commitd9cf2ec8207e6c159815b22f1ed8dbdc08a2342d (patch)
treeae7f78335d021e8a5e67ddeb0589d5199204d607
parent5f0d2dab9be5b0f89d61e9957bb728538b162230 (diff)
downloadhaskell-d9cf2ec8207e6c159815b22f1ed8dbdc08a2342d.tar.gz
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
-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