aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc5
1 files changed, 2 insertions, 3 deletions
diff --git a/emcc b/emcc
index f0c92b10..b96c6341 100755
--- a/emcc
+++ b/emcc
@@ -1517,9 +1517,8 @@ try:
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
+ 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', ',')
@@ -1535,7 +1534,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: