summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-09-07 11:36:40 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-09-07 21:19:20 -0400
commitdf04b81e12dac85292aa18c07e6afac7a8bd2fd5 (patch)
tree2bb09835daa4b20307764e49c88c024d7c86b1d3 /compiler/GHC/Driver
parent4ff93292243888545da452ea4d4c1987f2343591 (diff)
downloadhaskell-df04b81e12dac85292aa18c07e6afac7a8bd2fd5.tar.gz
Move DynFlags test into updateModDetailsIdInfos's caller (#17957)
Diffstat (limited to 'compiler/GHC/Driver')
-rw-r--r--compiler/GHC/Driver/Pipeline.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/GHC/Driver/Pipeline.hs b/compiler/GHC/Driver/Pipeline.hs
index 7276762f0f..79d2411bba 100644
--- a/compiler/GHC/Driver/Pipeline.hs
+++ b/compiler/GHC/Driver/Pipeline.hs
@@ -1237,8 +1237,11 @@ runPhase (HscOut src_flavour mod_name result) _ dflags = do
hscGenHardCode hsc_env' cgguts mod_location output_fn
final_iface <- liftIO (mkFullIface hsc_env'{hsc_dflags=iface_dflags} partial_iface (Just cg_infos))
- let final_mod_details = {-# SCC updateModDetailsIdInfos #-}
- updateModDetailsIdInfos iface_dflags cg_infos mod_details
+ let final_mod_details
+ | gopt Opt_OmitInterfacePragmas iface_dflags
+ = mod_details
+ | otherwise = {-# SCC updateModDetailsIdInfos #-}
+ updateModDetailsIdInfos cg_infos mod_details
setIface final_iface final_mod_details
-- See Note [Writing interface files]