Use setStackSize on Windows

This commit is contained in:
PoweredByPie 2024-05-18 06:44:52 -07:00
parent 6a3f906382
commit a41f4223de

View File

@ -522,10 +522,13 @@ void mainWrapped(int argc, char * * argv)
int main(int argc, char * * argv)
{
#ifndef _WIN32 // TODO implement on Windows
#ifndef _WIN32
// Increase the default stack size for the evaluator and for
// libstdc++'s std::regex.
nix::setStackSize(64 * 1024 * 1024);
#else
// Windows' default stack reservation is 1 MB, going over will fail
nix::setStackSize(1 * 1024 * 1024);
#endif
return nix::handleExceptions(argv[0], [&]() {