mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Remove asm.js support from HTML5 platform
Since WebGL 2.0 is required, requiring WebAssembly support as well has little impact on compatibility.
This commit is contained in:
parent
63283eca55
commit
ddf21ca016
7 changed files with 25 additions and 148 deletions
|
@ -19,7 +19,6 @@ def can_build():
|
|||
def get_opts():
|
||||
from SCons.Variables import BoolVariable
|
||||
return [
|
||||
BoolVariable('wasm', 'Compile to WebAssembly', False),
|
||||
BoolVariable('javascript_eval', 'Enable JavaScript eval interface', True),
|
||||
]
|
||||
|
||||
|
@ -106,17 +105,11 @@ def configure(env):
|
|||
env.Append(LINKFLAGS=['-s', 'EXTRA_EXPORTED_RUNTIME_METHODS="[\'FS\']"'])
|
||||
env.Append(LINKFLAGS=['-s', 'USE_WEBGL2=1'])
|
||||
|
||||
if env['wasm']:
|
||||
env.Append(LINKFLAGS=['-s', 'BINARYEN=1'])
|
||||
# In contrast to asm.js, enabling memory growth on WebAssembly has no
|
||||
# major performance impact, and causes only a negligible increase in
|
||||
# memory size.
|
||||
env.Append(LINKFLAGS=['-s', 'ALLOW_MEMORY_GROWTH=1'])
|
||||
env.extra_suffix = '.webassembly' + env.extra_suffix
|
||||
else:
|
||||
env.Append(LINKFLAGS=['-s', 'ASM_JS=1'])
|
||||
env.Append(LINKFLAGS=['--separate-asm'])
|
||||
env.Append(LINKFLAGS=['--memory-init-file', '1'])
|
||||
env.Append(LINKFLAGS=['-s', 'BINARYEN=1'])
|
||||
# In contrast to asm.js, enabling memory growth on WebAssembly has no
|
||||
# major performance impact, and causes only a negligible increase in
|
||||
# memory size.
|
||||
env.Append(LINKFLAGS=['-s', 'ALLOW_MEMORY_GROWTH=1'])
|
||||
|
||||
# TODO: Move that to opus module's config
|
||||
if 'module_opus_enabled' in env and env['module_opus_enabled']:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue