Skip to content

Commit 1934a98

Browse files
authored
Avoid 'pre-FOO' temp files, which are duplicates (#15920)
I noticed this while debugging. The files end up like this: emcc-8-FOO emcc-9-pre-BAR The pre of bar is identical to the one from after foo. This PR just makes us consistently always save a temp file afterwards.
1 parent 0630fc7 commit 1934a98

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

emcc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3239,7 +3239,6 @@ def phase_binaryen(target, options, wasm_target):
32393239
passes += ['--strip-debug']
32403240
if strip_producers:
32413241
passes += ['--strip-producers']
3242-
building.save_intermediate(wasm_target, 'pre-byn.wasm')
32433242
# if asyncify is used, we will use it in the next stage, and so if it is
32443243
# the only reason we need intermediate debug info, we can stop keeping it
32453244
if settings.ASYNCIFY:
@@ -3248,16 +3247,17 @@ def phase_binaryen(target, options, wasm_target):
32483247
wasm_target,
32493248
args=passes,
32503249
debug=intermediate_debug_info)
3250+
building.save_intermediate(wasm_target, 'byn.wasm')
32513251
elif strip_debug or strip_producers:
32523252
# we are not running wasm-opt. if we need to strip certain sections
32533253
# then do so using llvm-objcopy which is fast and does not rewrite the
32543254
# code (which is better for debug info)
3255-
building.save_intermediate(wasm_target, 'pre-strip.wasm')
32563255
building.strip(wasm_target, wasm_target, debug=strip_debug, producers=strip_producers)
3256+
building.save_intermediate(wasm_target, 'strip.wasm')
32573257

32583258
if settings.EVAL_CTORS:
3259-
building.save_intermediate(wasm_target, 'pre-ctors.wasm')
32603259
building.eval_ctors(final_js, wasm_target, debug_info=intermediate_debug_info)
3260+
building.save_intermediate(wasm_target, 'ctors.wasm')
32613261

32623262
# after generating the wasm, do some final operations
32633263

0 commit comments

Comments
 (0)