From ffab67b8daea8e3379824105439eba8226b72fde Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 25 Sep 2017 00:04:49 -0400 Subject: Use BoolVariable in target/component/advanced options. --- platform/javascript/detect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'platform/javascript/detect.py') diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index bea8f156af..b48a080ce0 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -27,7 +27,7 @@ def get_opts(): def get_flags(): return [ - ('tools', 'no'), + ('tools', False), ('module_theora_enabled', 'no'), ] -- cgit v1.2.3 From 5be675eb0332ccf660a81df51701146997ef9fcb Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 25 Sep 2017 00:27:32 -0400 Subject: Use BoolVariable for module options. --- platform/javascript/detect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'platform/javascript/detect.py') diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index b48a080ce0..fdcdc7da6f 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -28,7 +28,7 @@ def get_flags(): return [ ('tools', False), - ('module_theora_enabled', 'no'), + ('module_theora_enabled', False), ] @@ -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" -- cgit v1.2.3 From 3e69d19116e8d0d64fcbb096d925249e5d3596ed Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 25 Sep 2017 00:37:17 -0400 Subject: Use BoolVariable in platform-specific options. --- platform/javascript/detect.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'platform/javascript/detect.py') diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index fdcdc7da6f..cc29ad8956 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -17,10 +17,10 @@ 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), ] @@ -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 -- cgit v1.2.3