on master help sign in
Increase the stack reserved on Windows

Normal stack reserve is 2MB on 64-bit and it's a bit tight, it's just virtual memory so could have gone higher than this on 64-bit, but it's a limited resource for 32-bit users.

commitf3cb75fde439125058e4fd598f32453b04478647 authorNiklas Larsson <niklas@mm.st> dateThu 3 Mar 2016, 13:49 (11 years ago) parentd2a9e91
1 file changed+2−1
src/IRTS/CodegenC.hs+2−1
src/IRTS/CodegenC.hs+2−1
@@ -75,6 +75,7 @@ codegenC' defs out exec incs objs libs flags exports iface dbg
7575 libFlags <- getLibFlags
7676 incFlags <- getIncFlags
7777 envFlags <- getEnvFlags
78+ let stackFlag = if isWindows then ["-Wl,--stack,16777216"] else []
7879 let args = [gccDbg dbg] ++
7980 gccFlags iface ++
8081 -- # Any flags defined here which alter the RTS API must also be added to config.mk
@@ -85,7 +86,7 @@ codegenC' defs out exec incs objs libs flags exports iface dbg
8586 (if not iface then libFlags else []) ++
8687 incFlags ++
8788 (if not iface then libs else []) ++
88− flags ++
89+ flags ++ stackFlag ++
8990 ["-o", out]
9091-- putStrLn (show args)
9192 exit <- rawSystem comp args