diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-07-21 11:37:01 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-07-21 11:39:37 -0700 |
commit | 1fb983e3bfcf40b5b50f86906581ea74e7491cae (patch) | |
tree | 65258bffc344658791c34592260967fec333ea66 | |
parent | 92f653eed8ca32dec307ef335b3e98c9ccc4ab67 (diff) |
do not warn on malloc not present, we do so at runtime if used (+commented code to pull in malloc and other system libs based on EXPORTS)
-rwxr-xr-x | emscripten.py | 3 | ||||
-rw-r--r-- | tools/system_libs.py | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/emscripten.py b/emscripten.py index 82187127..3350536a 100755 --- a/emscripten.py +++ b/emscripten.py @@ -908,7 +908,8 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None, 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: + if requested not in all_implemented and \ + requested != '_malloc': # special-case malloc, EXPORTED by default for internal use, but we bake in a trivial allocator and warn at runtime if used in ASSERTIONS logging.warning('function requested to be exported, but not implemented: "%s"', requested) # Add named globals diff --git a/tools/system_libs.py b/tools/system_libs.py index 9586f98e..e700ba83 100644 --- a/tools/system_libs.py +++ b/tools/system_libs.py @@ -479,6 +479,13 @@ def calculate(temp_files, in_temp, stdout_, stderr_): shared.Settings.EXPORTED_FUNCTIONS.append('_' + dep) if more: add_back_deps(need) # recurse to get deps of deps + + ## depend on exported functions + #assert len(symbolses) > 0 + #for export in shared.Settings.EXPORTED_FUNCTIONS: + # if shared.Settings.VERBOSE: logging.debug('adding dependency on export %s' % export) + # symbolses[0].undefs.add(export[1:]) + for symbols in symbolses: add_back_deps(symbols) |