diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-05-12 11:35:58 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-05-12 11:35:58 -0700 |
commit | d3e3d803adce646cf169bdb361bb366c0712f598 (patch) | |
tree | 9756e033c24957be0f46a3804d7152b746cc7a43 /emscripten.py | |
parent | af721247c243951f544a1843954b3ea958d65c76 (diff) |
warn on bad exports, fixes #2338
Diffstat (limited to 'emscripten.py')
-rwxr-xr-x | emscripten.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/emscripten.py b/emscripten.py index e2aef648..d75214d5 100755 --- a/emscripten.py +++ b/emscripten.py @@ -895,10 +895,15 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None, exported_implemented_functions = set(metadata['exports']) export_bindings = settings['EXPORT_BINDINGS'] export_all = settings['EXPORT_ALL'] - for key in metadata['implementedFunctions'] + forwarded_json['Functions']['implementedFunctions'].keys(): # XXX perf + all_implemented = metadata['implementedFunctions'] + forwarded_json['Functions']['implementedFunctions'].keys() # XXX perf? + for key in all_implemented: if key in all_exported_functions or export_all or (export_bindings and key.startswith('_emscripten_bind')): exported_implemented_functions.add(key) implemented_functions = set(metadata['implementedFunctions']) + if settings['ASSERTIONS'] and settings.get('ORIGINAL_EXPORTED_FUNCTIONS'): + for requested in settings['ORIGINAL_EXPORTED_FUNCTIONS']: + if requested not in all_implemented: + logging.warning('function requested to be exported, but not implemented: "%s"', requested) # Add named globals named_globals = '\n'.join(['var %s = %s;' % (k, v) for k, v in metadata['namedGlobals'].iteritems()]) |