summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-03-18 15:54:35 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-11-11 03:20:00 -0500
commit584058ddff71460023712a8d816b83b581e6e78f (patch)
treec37e92b7b23faadaf61aee22455ec0e3ca4931a9 /compiler
parentc6264a2d652517954b7cd076c7bc4487ed17c97d (diff)
downloadhaskell-584058ddff71460023712a8d816b83b581e6e78f.tar.gz
Enable -fexpose-internal-symbols when debug level >=2
This seems like a reasonable default as the object file size increases by around 5%.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/GHC/Driver/Session.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs
index 4c53e56f3d..80edddb828 100644
--- a/compiler/GHC/Driver/Session.hs
+++ b/compiler/GHC/Driver/Session.hs
@@ -4419,7 +4419,13 @@ setVerbosity :: Maybe Int -> DynP ()
setVerbosity mb_n = upd (\dfs -> dfs{ verbosity = mb_n `orElse` 3 })
setDebugLevel :: Maybe Int -> DynP ()
-setDebugLevel mb_n = upd (\dfs -> dfs{ debugLevel = mb_n `orElse` 2 })
+setDebugLevel mb_n =
+ upd (\dfs -> exposeSyms $ dfs{ debugLevel = n })
+ where
+ n = mb_n `orElse` 2
+ exposeSyms
+ | n > 2 = setGeneralFlag' Opt_ExposeInternalSymbols
+ | otherwise = id
data PkgDbRef
= GlobalPkgDb