summaryrefslogtreecommitdiff
path: root/rts/RtsStartup.c
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@mit.edu>2013-09-13 22:11:12 -0700
committerEdward Z. Yang <ezyang@mit.edu>2013-09-15 23:53:10 -0700
commitea8317406e32ee8b91896439fe0810f3601d61ca (patch)
tree85e4af1181246262fcc7417e19fb8cfa35bc989c /rts/RtsStartup.c
parent769bfc7332a89e8f022e3c1b9f5ba3a2a13f88c6 (diff)
downloadhaskell-ea8317406e32ee8b91896439fe0810f3601d61ca.tar.gz
Distinguish between hs-main cases when giving rtsopts advice.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Diffstat (limited to 'rts/RtsStartup.c')
-rw-r--r--rts/RtsStartup.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c
index 39c5ef1f94..a1c74ae6a6 100644
--- a/rts/RtsStartup.c
+++ b/rts/RtsStartup.c
@@ -69,7 +69,8 @@ static void flushStdHandles(void);
const RtsConfig defaultRtsConfig = {
.rts_opts_enabled = RtsOptsSafeOnly,
- .rts_opts = NULL
+ .rts_opts = NULL,
+ .rts_hs_main = rtsFalse
};
/* -----------------------------------------------------------------------------
@@ -111,6 +112,14 @@ hs_init(int *argc, char **argv[])
}
void
+hs_init_with_rtsopts(int *argc, char **argv[])
+{
+ RtsConfig rts_opts = defaultRtsConfig; /* by value */
+ rts_opts.rts_opts_enabled = RtsOptsAll;
+ hs_init_ghc(argc, argv, rts_opts);
+}
+
+void
hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config)
{
hs_init_count++;
@@ -146,11 +155,11 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config)
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_opts_enabled, rts_config.rts_opts, rts_config.rts_hs_main);
} else {
setFullProgArgv(*argc,*argv);
setupRtsFlags(argc, *argv,
- rts_config.rts_opts_enabled, rts_config.rts_opts);
+ rts_config.rts_opts_enabled, rts_config.rts_opts, rts_config.rts_hs_main);
}
/* Initialise the stats department, phase 1 */