Skip to content

Commit 5ffaadf

Browse files
authored
Combine two if final_js blocks in link.py. NFC (#21023)
1 parent 4aa9164 commit 5ffaadf

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tools/link.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2197,11 +2197,6 @@ def phase_binaryen(target, options, wasm_target, memfile):
21972197
debug_info=intermediate_debug_info)
21982198
save_intermediate_with_wasm('postclean', wasm_target)
21992199

2200-
if settings.ASYNCIFY_LAZY_LOAD_CODE:
2201-
with ToolchainProfiler.profile_block('asyncify_lazy_load_code'):
2202-
building.asyncify_lazy_load_code(wasm_target, debug=intermediate_debug_info)
2203-
2204-
if final_js:
22052200
if options.use_closure_compiler:
22062201
with ToolchainProfiler.profile_block('closure_compile'):
22072202
final_js = building.closure_compiler(final_js, extra_closure_args=options.closure_args)
@@ -2211,6 +2206,10 @@ def phase_binaryen(target, options, wasm_target, memfile):
22112206
final_js = building.transpile(final_js)
22122207
save_intermediate_with_wasm('traspile', wasm_target)
22132208

2209+
if settings.ASYNCIFY_LAZY_LOAD_CODE:
2210+
with ToolchainProfiler.profile_block('asyncify_lazy_load_code'):
2211+
building.asyncify_lazy_load_code(wasm_target, debug=intermediate_debug_info)
2212+
22142213
symbols_file = None
22152214
if options.emit_symbol_map:
22162215
symbols_file = shared.replace_or_append_suffix(target, '.symbols')

0 commit comments

Comments
 (0)