diff options
-rw-r--r-- | compiler/GHC/Driver/Session.hs | 17 | ||||
-rw-r--r-- | docs/users_guide/phases.rst | 2 | ||||
-rw-r--r-- | testsuite/tests/rts/all.T | 5 |
3 files changed, 13 insertions, 11 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] diff --git a/docs/users_guide/phases.rst b/docs/users_guide/phases.rst index b784fa7662..fb635531e3 100644 --- a/docs/users_guide/phases.rst +++ b/docs/users_guide/phases.rst @@ -1330,6 +1330,8 @@ for example). :type: dynamic :category: linking + :default: on + :since: 9.4.1 This instructs the linker to produce an executable that supports Apple's diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T index d907ceff62..0c541dd480 100644 --- a/testsuite/tests/rts/all.T +++ b/testsuite/tests/rts/all.T @@ -473,9 +473,8 @@ test('keep-cafs', # Test proper functioning of C++ exceptions within a C++ program. # On darwin, this requires -fcompact-unwind. -# When -fcompact-unwind becomes default, generalize test to all platforms. -test('T11829', unless(opsys('darwin'), skip), compile_and_run, - ['T11829_c.cpp -l{} -fcompact-unwind'.format(config.stdcxx_impl)]) +test('T11829', [ check_errmsg("This is a test") ], compile_and_run, + ['T11829_c.cpp -l{}'.format(config.stdcxx_impl)]) test('T16514', normal, compile_and_run, ['T16514_c.c']) test('test-zeroongc', extra_run_opts('-DZ'), compile_and_run, ['-debug']) |