diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-25 11:15:47 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-25 11:15:47 -0700 |
commit | a00ffce0b71a670b0d227562cfad649947b714a7 (patch) | |
tree | 57a8ff977f39e6dbb5a04c3a9196b7eddf8e655b | |
parent | fac94229d8765d20aa00fdfcad1e7f940b5cb322 (diff) |
clean up meminit detection
-rwxr-xr-x | emcc | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1510,10 +1510,9 @@ try: if shared.Settings.USE_TYPED_ARRAYS != 2: if type(memory_init_file) == int: print >> sys.stderr, 'emcc: warning: memory init file requires typed arrays mode 2' else: - memfile = target + '.mem' - seen_memory_init = False + memfile = target + '.mem' + shared.try_delete(memfile) def repl(m): - seen_memory_init = True # handle chunking of the memory initializer s = re.sub('[\[\]\n\(\)\. ]', '', m.groups(0)[0]) s = s.replace('concat', ',') @@ -1529,7 +1528,7 @@ try: open(final + '.mem.js', 'w').write(src) final += '.mem.js' if DEBUG: - if seen_memory_init: + if os.path.exists(memfile): save_intermediate('meminit') print >> sys.stderr, 'emcc: wrote memory initialization to %s' % memfile else: |