summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-09-22 10:11:53 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-10-19 03:30:16 -0400
commit981f2c74c20cc0a07413846a8200ebec4401ac27 (patch)
treee9423972f2ce3444be9ba8ece1a075bcc2d283ce
parent837ce6cf607317b4462c0d77a640eb1b35b3db5a (diff)
downloadhaskell-981f2c74c20cc0a07413846a8200ebec4401ac27.tar.gz
driver: Update cached DynFlags in ModSummary if we are enabling -dynamic-too
-rw-r--r--compiler/GHC/Driver/Pipeline.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/GHC/Driver/Pipeline.hs b/compiler/GHC/Driver/Pipeline.hs
index 202043665c..cc2e311419 100644
--- a/compiler/GHC/Driver/Pipeline.hs
+++ b/compiler/GHC/Driver/Pipeline.hs
@@ -239,12 +239,12 @@ compileOne' mHscMessage
plugin_hsc_env <- initializePlugins hsc_env (Just (ms_mnwib summary))
let pipe_env = mkPipeEnv NoStop input_fn pipelineOutput
- status <- hscRecompStatus mHscMessage plugin_hsc_env summary
+ 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, summary, status)
+ let pipeline = hscPipeline pipe_env (setDumpPrefix pipe_env plugin_hsc_env, upd_summary, status)
(iface, linkable) <- runPipeline (hsc_hooks hsc_env) pipeline
-- See Note [ModDetails and --make mode]
- details <- initModDetails plugin_hsc_env summary iface
+ details <- initModDetails plugin_hsc_env upd_summary iface
return $! HomeModInfo iface details linkable
where lcl_dflags = ms_hspp_opts summary
@@ -303,6 +303,7 @@ compileOne' mHscMessage
| otherwise
= (backend dflags, dflags2)
dflags = dflags3 { includePaths = addImplicitQuoteInclude old_paths [current_dir] }
+ upd_summary = summary { ms_hspp_opts = dflags }
hsc_env = hscSetFlags dflags hsc_env0
-- ---------------------------------------------------------------------------