summaryrefslogtreecommitdiff
path: root/compiler/GHC
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-04-28 15:46:43 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-06-01 22:27:10 -0400
commit468f919b1bd27d8a58a789a6bb1be4295097388c (patch)
tree20259b0d37ee2ec7a588207561089bf346fda8ed /compiler/GHC
parent5433a35e28e2487827b88f2396865c29ecee0833 (diff)
downloadhaskell-468f919b1bd27d8a58a789a6bb1be4295097388c.tar.gz
Make -fcompact-unwind the default
This is a follow-up to !7247 (closed) making the inclusion of compact unwinding sections the default. Also a slight refactoring/simplification of the flag handling to add -fno-compact-unwind.
Diffstat (limited to 'compiler/GHC')
-rw-r--r--compiler/GHC/Driver/Session.hs17
1 files changed, 9 insertions, 8 deletions
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs
index f765bb44ce..e200bd46bb 100644
--- a/compiler/GHC/Driver/Session.hs
+++ b/compiler/GHC/Driver/Session.hs
@@ -2121,12 +2121,6 @@ dynamic_flags_deps = [
(NoArg (setGeneralFlag Opt_SingleLibFolder))
, make_ord_flag defGhcFlag "pie" (NoArg (setGeneralFlag Opt_PICExecutable))
, make_ord_flag defGhcFlag "no-pie" (NoArg (unSetGeneralFlag Opt_PICExecutable))
- , make_ord_flag defGhcFlag "fcompact-unwind"
- (noArgM (\dflags -> do
- if platformOS (targetPlatform dflags) == OSDarwin
- then return (gopt_set dflags Opt_CompactUnwind)
- else do addWarn "-compact-unwind is only implemented by the darwin platform. Ignoring."
- return dflags))
------- Specific phases --------------------------------------------
-- need to appear before -pgmL to be parsed as LLVM flags.
@@ -3498,7 +3492,13 @@ fFlagsDeps = [
flagSpec "show-loaded-modules" Opt_ShowLoadedModules,
flagSpec "whole-archive-hs-libs" Opt_WholeArchiveHsLibs,
flagSpec "keep-cafs" Opt_KeepCAFs,
- flagSpec "link-rts" Opt_LinkRts
+ flagSpec "link-rts" Opt_LinkRts,
+ flagSpec' "compact-unwind" Opt_CompactUnwind
+ (\turn_on -> updM (\dflags -> do
+ unless (platformOS (targetPlatform dflags) == OSDarwin && turn_on)
+ (addWarn "-compact-unwind is only implemented by the darwin platform. Ignoring.")
+ return dflags))
+
]
++ fHoleFlags
@@ -3787,7 +3787,8 @@ defaultFlags settings
Opt_SimplPreInlining,
Opt_VersionMacros,
Opt_RPath,
- Opt_DumpWithWays
+ Opt_DumpWithWays,
+ Opt_CompactUnwind
]
++ [f | (ns,f) <- optLevelFlags, 0 `elem` ns]