summaryrefslogtreecommitdiff
path: root/platform/javascript/detect.py
diff options
context:
space:
mode:
Diffstat (limited to 'platform/javascript/detect.py')
-rw-r--r--platform/javascript/detect.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py
index fc909f6619..22b5f1f87a 100644
--- a/platform/javascript/detect.py
+++ b/platform/javascript/detect.py
@@ -25,7 +25,6 @@ def get_opts():
def get_flags():
return [
('tools', False),
- ('module_theora_enabled', False),
# Disabling the mbedtls module reduces file size.
# The module has little use due to the limited networking functionality
# in this platform. For the available networking methods, the browser
@@ -123,12 +122,17 @@ def configure(env):
## Link flags
env.Append(LINKFLAGS=['-s', 'BINARYEN=1'])
+ env.Append(LINKFLAGS=['-s', 'BINARYEN_TRAP_MODE=\'clamp\''])
# Allow increasing memory buffer size during runtime. This is efficient
# when using WebAssembly (in comparison to asm.js) and works well for
# us since we don't know requirements at compile-time.
env.Append(LINKFLAGS=['-s', 'ALLOW_MEMORY_GROWTH=1'])
+ # Since we use both memory growth and MEMFS preloading,
+ # this avoids unecessary copying on start-up.
+ env.Append(LINKFLAGS=['--no-heap-copy'])
+
# This setting just makes WebGL 2 APIs available, it does NOT disable WebGL 1.
env.Append(LINKFLAGS=['-s', 'USE_WEBGL2=1'])