From 207fb165bfd1fefd1b4339c9427a569b19d0dcae Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Mon, 14 Jun 2021 07:57:28 +0200 Subject: [PATCH] [HTML5] Raise default initial memory to 32 MiB. The memory was resized in any case during start. Mitigate Chromium issue: https://bugs.chromium.org/p/v8/issues/detail?id=11863 Also fix a warning about SAFE_HEAP being a linker only flag. (cherry picked from commit 897c906ebfd1736b27dd8aadd19c18da8a38dee2) --- platform/javascript/detect.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index 49502a9e464..b527336f831 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -29,7 +29,7 @@ def get_opts(): from SCons.Variables import BoolVariable return [ - ("initial_memory", "Initial WASM memory (in MiB)", 16), + ("initial_memory", "Initial WASM memory (in MiB)", 32), BoolVariable("use_assertions", "Use Emscripten runtime assertions", False), BoolVariable("use_thinlto", "Use ThinLTO", False), BoolVariable("use_ubsan", "Use Emscripten undefined behavior sanitizer (UBSAN)", False), @@ -126,7 +126,6 @@ def configure(env): env.Append(CCFLAGS=["-fsanitize=leak"]) env.Append(LINKFLAGS=["-fsanitize=leak"]) if env["use_safe_heap"]: - env.Append(CCFLAGS=["-s", "SAFE_HEAP=1"]) env.Append(LINKFLAGS=["-s", "SAFE_HEAP=1"]) # Closure compiler