summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2023-01-25 12:13:25 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-05-05 18:42:31 -0400
commita5174a591b890544b065a3fcb5923f51e61283f2 (patch)
tree086eb42144d4d328305e01c1f8a584a0b728c90d
parent983ce55815f2dd57f84ee86eee97febf7d80b470 (diff)
downloadhaskell-a5174a591b890544b065a3fcb5923f51e61283f2.tar.gz
driver: Use hooks from plugin_hsc_env
This fixes a bug in oneshot mode where hooks modified in a plugin wouldn't be used in oneshot mode because we neglected to use the right hsc_env. This was observed by @csabahruska.
-rw-r--r--compiler/GHC/Driver/Pipeline.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Driver/Pipeline.hs b/compiler/GHC/Driver/Pipeline.hs
index 0737a2f8c1..e539c3fcbf 100644
--- a/compiler/GHC/Driver/Pipeline.hs
+++ b/compiler/GHC/Driver/Pipeline.hs
@@ -249,7 +249,7 @@ compileOne' mHscMessage
status <- hscRecompStatus mHscMessage plugin_hsc_env upd_summary
mb_old_iface mb_old_linkable (mod_index, nmods)
let pipeline = hscPipeline pipe_env (setDumpPrefix pipe_env plugin_hsc_env, upd_summary, status)
- (iface, linkable) <- runPipeline (hsc_hooks hsc_env) pipeline
+ (iface, linkable) <- runPipeline (hsc_hooks plugin_hsc_env) pipeline
-- See Note [ModDetails and --make mode]
details <- initModDetails plugin_hsc_env iface
linkable' <- traverse (initWholeCoreBindings plugin_hsc_env iface details) (homeMod_bytecode linkable)