diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-09-25 22:44:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-25 22:44:05 +0200 |
commit | 78aa7b382a8b1c80e0e2b01e02ff0acb2942e2e1 (patch) | |
tree | f233c01bb087310b8e3ae931287f4740135cac61 /platform/javascript/detect.py | |
parent | 5195935156f942418a2ef3f1159a4bab391ba11e (diff) | |
parent | 3e69d19116e8d0d64fcbb096d925249e5d3596ed (diff) | |
download | redot-engine-78aa7b382a8b1c80e0e2b01e02ff0acb2942e2e1.tar.gz |
Merge pull request #11567 from QuLogic/scons-var-types
Add types to scons command-line options
Diffstat (limited to 'platform/javascript/detect.py')
-rw-r--r-- | platform/javascript/detect.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index bea8f156af..cc29ad8956 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -17,18 +17,18 @@ def can_build(): def get_opts(): - + from SCons.Variables import BoolVariable return [ - ['wasm', 'Compile to WebAssembly', 'no'], - ['javascript_eval', 'Enable JavaScript eval interface', 'yes'], + BoolVariable('wasm', 'Compile to WebAssembly', False), + BoolVariable('javascript_eval', 'Enable JavaScript eval interface', True), ] def get_flags(): return [ - ('tools', 'no'), - ('module_theora_enabled', 'no'), + ('tools', False), + ('module_theora_enabled', False), ] @@ -95,7 +95,7 @@ def configure(env): # These flags help keep the file size down env.Append(CPPFLAGS=["-fno-exceptions", '-DNO_SAFE_CAST', '-fno-rtti']) - if env['javascript_eval'] == 'yes': + if env['javascript_eval']: env.Append(CPPFLAGS=['-DJAVASCRIPT_EVAL_ENABLED']) ## Link flags @@ -103,7 +103,7 @@ def configure(env): env.Append(LINKFLAGS=['-s', 'EXTRA_EXPORTED_RUNTIME_METHODS="[\'FS\']"']) env.Append(LINKFLAGS=['-s', 'USE_WEBGL2=1']) - if (env['wasm'] == 'yes'): + 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 @@ -116,5 +116,5 @@ def configure(env): env.Append(LINKFLAGS=['--memory-init-file', '1']) # TODO: Move that to opus module's config - if("module_opus_enabled" in env and env["module_opus_enabled"] != "no"): + if 'module_opus_enabled' in env and env['module_opus_enabled']: env.opus_fixed_point = "yes" |