summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-05-14 21:23:58 +0100
committerIan Lynagh <ian@well-typed.com>2013-05-14 21:23:58 +0100
commit192c7b74eb439221c20203c603e5b3c5a9d98cc3 (patch)
tree25f9761b4f8cd15b258f44763b037f5058ec8707 /driver
parent2c9cb4d2c29eecb7bbe120601b1b47695773ccde (diff)
downloadhaskell-192c7b74eb439221c20203c603e5b3c5a9d98cc3.tar.gz
Define the right RTS config in the Windows dyn wrapper programs
This is particularly important as without it validate fails, as it tries to pass RTS options to haddock, and with the default RTS config those options aren't permitted.
Diffstat (limited to 'driver')
-rw-r--r--driver/utils/dynwrapper.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/driver/utils/dynwrapper.c b/driver/utils/dynwrapper.c
index eead8bd0a0..a84b5aef03 100644
--- a/driver/utils/dynwrapper.c
+++ b/driver/utils/dynwrapper.c
@@ -4,6 +4,7 @@ Need to concatenate this file with something that defines:
LPTSTR path_dirs[];
LPTSTR progDll;
LPTSTR rtsDll;
+int rtsOpts;
*/
#include <stdarg.h>
@@ -161,7 +162,7 @@ int main(int argc, char *argv[]) {
LPTSTR oldPath;
StgClosure *main_p;
- RtsConfig *rts_config_p;
+ RtsConfig rts_config;
hs_main_t hs_main_p;
// MSDN says: An environment variable has a maximum size limit of
@@ -189,9 +190,10 @@ int main(int argc, char *argv[]) {
hRtsDll = GetNonNullModuleHandle(rtsDll);
hs_main_p = GetNonNullProcAddress(hRtsDll, "hs_main");
- rts_config_p = GetNonNullProcAddress(hRtsDll, "defaultRtsConfig");
main_p = GetNonNullProcAddress(hProgDll, "ZCMain_main_closure");
+ rts_config.rts_opts_enabled = rtsOpts;
+ rts_config.rts_opts = NULL;
- return hs_main_p(argc, argv, main_p, *rts_config_p);
+ return hs_main_p(argc, argv, main_p, rts_config);
}