diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-11-29 15:40:53 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-12-07 14:23:20 -0800 |
commit | f80d277fd8a2a767d3c86c2e9f3d778a902e2f61 (patch) | |
tree | a7e0a3b5b1a02326947742652da92a633a0d4a52 /emscripten.py | |
parent | 663a7e98b9f7ee1ca612fe0df9e07ccc70340751 (diff) |
fix ctors crash
Diffstat (limited to 'emscripten.py')
-rwxr-xr-x | emscripten.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/emscripten.py b/emscripten.py index d7531ad1..659de9f4 100755 --- a/emscripten.py +++ b/emscripten.py @@ -298,7 +298,10 @@ def emscript(infile, settings, outfile, libraries=[]): exports.append("'%s': %s" % (export, export)) exports = '{ ' + ', '.join(exports) + ' }' # calculate globals - del forwarded_json['Variables']['globals']['_llvm_global_ctors'] # not a true variable + try: + del forwarded_json['Variables']['globals']['_llvm_global_ctors'] # not a true variable + except: + pass global_vars = forwarded_json['Variables']['globals'].keys() global_funcs = ['_' + x for x in forwarded_json['Functions']['libraryFunctions'].keys()] asm_globals = ''.join([' var ' + g + '=env.' + g + ';\n' for g in basics + global_funcs + global_vars]) |