diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-02-17 14:02:35 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-02-17 14:03:35 -0800 |
commit | a481dec416597879d56b0254e7c255b71c1b36e2 (patch) | |
tree | 67635f560131c98215c86c7bea7d96bb48d05aef /emscripten.py | |
parent | bae7c6e93962e4cb25ee5fa532bee5ba7f8f237c (diff) |
check all i64 functions for whether we need to include precise i64 code
Diffstat (limited to 'emscripten.py')
-rwxr-xr-x | emscripten.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/emscripten.py b/emscripten.py index c96c56a0..a1b6a606 100755 --- a/emscripten.py +++ b/emscripten.py @@ -801,9 +801,13 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None, # Settings changes assert settings['TARGET_LE32'] == 1 settings['TARGET_LE32'] = 2 - if 'i64Add' in metadata['declares']: # TODO: others, once we split them up - settings['PRECISE_I64_MATH'] = 2 - metadata['declares'] = filter(lambda i64_func: i64_func not in ['getHigh32', 'setHigh32', '__muldi3', '__divdi3', '__remdi3', '__udivdi3', '__uremdi3'], metadata['declares']) # FIXME: do these one by one as normal js lib funcs + i64_funcs = ['i64Add', 'i64Subtract', '__muldi3', '__divdi3', '__udivdi3', '__remdi3', '__uremdi3'] + for i64_func in i64_funcs: + if i64_func in metadata['declares']: + settings['PRECISE_I64_MATH'] = 2 + break + + metadata['declares'] = filter(lambda i64_func: i64_func not in ['getHigh32', 'setHigh32', '__muldi3', '__divdi3', '__remdi3', '__udivdi3', '__uremdi3'], metadata['declares']) # FIXME: do these one by one as normal js lib funcs # Integrate info from backend settings['DEFAULT_LIBRARY_FUNCS_TO_INCLUDE'] = list( |