Use -O0 for now on WebAssembly (haxefoundation/hxcpp#987)

This commit is contained in:
Joshua Granick
2023-05-26 13:50:51 -07:00
parent 2406ff4b94
commit 1a46366823

View File

@@ -204,26 +204,41 @@ class WebAssemblyPlatform extends PlatformTarget
args.push("NO_DISABLE_EXCEPTION_CATCHING=1"); args.push("NO_DISABLE_EXCEPTION_CATCHING=1");
args.push("-s"); args.push("-s");
args.push("ASSERTIONS=1"); args.push("ASSERTIONS=1");
// args.push("-s");
// args.push("ASSERTIONS=2");
// args.push("-s");
// args.push("STACK_OVERFLOW_CHECK=2");
// args.push("-s");
// args.push("DEMANGLE_SUPPORT=1");
} }
// set initial size // set initial size
args.push("-s"); // args.push("-s");
args.push("TOTAL_MEMORY=32MB"); // args.push("INITIAL_MEMORY=32MB");
if (project.targetFlags.exists("final")) args.push("-s");
{ args.push("STACK_SIZE=1MB");
args.push("-O3");
} // args.push("-s");
else if (!project.debug) // args.push("SAFE_HEAP=1");
{
// args.push ("-s"); // if (project.targetFlags.exists("final"))
// args.push ("OUTLINING_LIMIT=70000"); // {
args.push("-O2"); // args.push("-O3");
} // }
else // else if (!project.debug)
{ // {
args.push("-O1"); // // args.push ("-s");
} // // args.push ("OUTLINING_LIMIT=70000");
// args.push("-O2");
// }
// else
// {
// args.push("-O1");
// }
// https://github.com/HaxeFoundation/hxcpp/issues/987
args.push("-O0");
args.push("-s"); args.push("-s");
args.push("ALLOW_MEMORY_GROWTH=1"); args.push("ALLOW_MEMORY_GROWTH=1");