diff options
author | Simon Marlow <marlowsd@gmail.com> | 2014-06-09 09:18:12 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2015-04-07 09:57:49 +0100 |
commit | a7ab161602aa0b5833d22c66e64eebb1d9275235 (patch) | |
tree | 22db09216cbd2165359d8add08b5cf4cdbf5041f /ghc/hschooks.c | |
parent | 72092904e0ac1725c05c0447e1efe7ab541faa95 (diff) | |
download | haskell-a7ab161602aa0b5833d22c66e64eebb1d9275235.tar.gz |
Replace hooks by callbacks in RtsConfig (#8785)
Summary:
Hooks rely on static linking semantics, and are broken by -Bsymbolic
which we need when using dynamic linking.
Test Plan: Built it
Reviewers: austin, hvr, tibbe
Differential Revision: https://phabricator.haskell.org/D8
Diffstat (limited to 'ghc/hschooks.c')
-rw-r--r-- | ghc/hschooks.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ghc/hschooks.c b/ghc/hschooks.c index 67cdd57ab9..2ebbace136 100644 --- a/ghc/hschooks.c +++ b/ghc/hschooks.c @@ -54,3 +54,15 @@ StackOverflowHook (StgWord stack_size) /* in bytes */ fprintf(stderr, "GHC stack-space overflow: current limit is %zu bytes.\nUse the `-K<size>' option to increase it.\n", (size_t)stack_size); } +int main (int argc, char *argv[]) +{ + RtsConfig conf = defaultRtsConfig; +#if __GLASGOW_HASKELL__ >= 711 + conf.defaultsHook = defaultsHook; + conf.rts_opts_enabled = RtsOptsAll; + conf.stackOverflowHook = StackOverflowHook; +#endif + extern StgClosure ZCMain_main_closure; + + hs_main(argc, argv, &ZCMain_main_closure, conf); +} |