summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Flags.hs
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2021-12-24 19:24:19 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-01-24 21:28:24 -0500
commit516eeb9e295b50872398bc9848a42ab41f743316 (patch)
treee6deb9f5ad1254cbab00992a6658998571c9c4d1 /compiler/GHC/Driver/Flags.hs
parent3b009e1a6247057ff976043695b797b5d0649414 (diff)
downloadhaskell-516eeb9e295b50872398bc9848a42ab41f743316.tar.gz
Add -fcompact-unwind
This gives users the choice to enable __compact_unwind sections when linking. These were previously hardcoded to be removed. This can be used to solved the problem "C++ does not catch exceptions when used with Haskell-main and linked by ghc", https://gitlab.haskell.org/ghc/ghc/-/issues/11829 It does not change the default behavior, because I can not estimate the impact this would have. When Apple first introduced the compact unwind ABI, a number of open source projects have taken the easy route of disabling it, avoiding errors or even just warnings shortly after its introduction. Since then, about a decade has passed, so it seems quite possible that Apple itself, and presumably many programs with it, have successfully switched to the new format, to the point where the old __eh_frame section support is in disrepair. Perhaps we should get along with the program, but for now we can test the waters with this flag, and use it to fix packages that need it.
Diffstat (limited to 'compiler/GHC/Driver/Flags.hs')
-rw-r--r--compiler/GHC/Driver/Flags.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/GHC/Driver/Flags.hs b/compiler/GHC/Driver/Flags.hs
index ee5144854d..7f8438bf2a 100644
--- a/compiler/GHC/Driver/Flags.hs
+++ b/compiler/GHC/Driver/Flags.hs
@@ -291,6 +291,7 @@ data GeneralFlag
| Opt_Ticky_Dyn_Thunk
| Opt_RPath
| Opt_RelativeDynlibPaths
+ | Opt_CompactUnwind -- ^ @-fcompact-unwind@
| Opt_Hpc
| Opt_FamAppCache
| Opt_ExternalInterpreter