diff options
Diffstat (limited to 'rts/RtsStartup.c')
-rw-r--r-- | rts/RtsStartup.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c index 190088274e..c50bb07f75 100644 --- a/rts/RtsStartup.c +++ b/rts/RtsStartup.c @@ -69,12 +69,6 @@ static int hs_init_count = 0; static void flushStdHandles(void); -const RtsConfig defaultRtsConfig = { - .rts_opts_enabled = RtsOptsSafeOnly, - .rts_opts = NULL, - .rts_hs_main = rtsFalse -}; - /* ----------------------------------------------------------------------------- Initialise floating point unit on x86 (currently disabled; See Note [x86 Floating point precision] in compiler/nativeGen/X86/Instr.hs) @@ -148,7 +142,7 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config) initRtsFlagsDefaults(); /* Call the user hook to reset defaults, if present */ - defaultsHook(); + rts_config.defaultsHook(); /* Parse the flags, separating the RTS flags from the programs args */ if (argc == NULL || argv == NULL) { @@ -156,12 +150,10 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config) int my_argc = 1; char *my_argv[] = { "<unknown>", NULL }; setFullProgArgv(my_argc,my_argv); - setupRtsFlags(&my_argc, my_argv, - rts_config.rts_opts_enabled, rts_config.rts_opts, rts_config.rts_hs_main); + setupRtsFlags(&my_argc, my_argv, rts_config); } else { setFullProgArgv(*argc,*argv); - setupRtsFlags(argc, *argv, - rts_config.rts_opts_enabled, rts_config.rts_opts, rts_config.rts_hs_main); + setupRtsFlags(argc, *argv, rts_config); #ifdef DEBUG /* load debugging symbols for current binary */ @@ -328,7 +320,7 @@ hs_exit_(rtsBool wait_foreign) /* start timing the shutdown */ stat_startExit(); - OnExitHook(); + rtsConfig.onExitHook(); flushStdHandles(); |