diff options
-rwxr-xr-x | emscripten.py | 3 | ||||
-rwxr-xr-x | tests/runner.py | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/emscripten.py b/emscripten.py index 3e3538e9..ab68fcaa 100755 --- a/emscripten.py +++ b/emscripten.py @@ -291,8 +291,9 @@ def emscript(infile, settings, outfile, libraries=[], compiler_engine=None, indexed_functions.add(key) if settings.get('ASM_JS'): export_bindings = settings['EXPORT_BINDINGS'] + export_all = settings['EXPORT_ALL'] for key in curr_forwarded_json['Functions']['implementedFunctions'].iterkeys(): - if key in all_exported_functions or (export_bindings and key.startswith('_emscripten_bind')): + if key in all_exported_functions or export_all or (export_bindings and key.startswith('_emscripten_bind')): exported_implemented_functions.add(key) for key, value in curr_forwarded_json['Functions']['unimplementedFunctions'].iteritems(): forwarded_json['Functions']['unimplementedFunctions'][key] = value diff --git a/tests/runner.py b/tests/runner.py index 4a9bf623..72d2967a 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -4062,6 +4062,11 @@ def process(filename): Settings.EXPORTED_FUNCTIONS = ['_main', '_save_me_aimee'] self.do_run(src, 'hello world!\n*100*\n*fivesix*\nmann\n', post_build=check) + # test EXPORT_ALL + Settings.EXPORTED_FUNCTIONS = [] + Settings.EXPORT_ALL = 1 + self.do_run(src, 'hello world!\n*100*\n*fivesix*\nmann\n', post_build=check) + def test_inlinejs(self): if Settings.ASM_JS: return self.skip('asm does not support random code, TODO: something that works in asm') src = r''' |