diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-14 14:09:10 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-14 14:09:10 -0700 |
commit | cb52c13b00f65b8955f812448db15058e4303295 (patch) | |
tree | 0d76c8466c86206f0bf99ecc29c6d3afce36d6b4 /emscripten.py | |
parent | d18d12ccd38f7c3749ce8ead9daeef638df11212 (diff) |
add option to move elements from post into before the asm block
Diffstat (limited to 'emscripten.py')
-rwxr-xr-x | emscripten.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/emscripten.py b/emscripten.py index 7d1d82f2..cec28faa 100755 --- a/emscripten.py +++ b/emscripten.py @@ -349,6 +349,13 @@ def emscript(infile, settings, outfile, libraries=[], compiler_engine=None, post = post_rest funcs_js += ['\n' + post_funcs + '// EMSCRIPTEN_END_FUNCS\n'] + # Move preAsms to their right place + def move_preasm(m): + contents = m.groups(0)[0] + outfile.write(contents + '\n') + return '' + post = re.sub(r'/\* PRE_ASM \*/(.*)\n', lambda m: move_preasm(m), post) + simple = os.environ.get('EMCC_SIMPLE_ASM') class Counter: i = 0 |