@@ -1677,12 +1677,10 @@ def include_and_export(name):
1677
1677
# placeholder strings for JS glue, to be replaced with subresource locations in do_binaryen
1678
1678
shared .Settings .WASM_TEXT_FILE = shared .FilenameReplacementStrings .WASM_TEXT_FILE
1679
1679
shared .Settings .WASM_BINARY_FILE = shared .FilenameReplacementStrings .WASM_BINARY_FILE
1680
- shared .Settings .ASMJS_CODE_FILE = shared .FilenameReplacementStrings .ASMJS_CODE_FILE
1681
1680
else :
1682
1681
# set file locations, so that JS glue can find what it needs
1683
1682
shared .Settings .WASM_TEXT_FILE = shared .JS .escape_for_js_string (os .path .basename (wasm_text_target ))
1684
1683
shared .Settings .WASM_BINARY_FILE = shared .JS .escape_for_js_string (os .path .basename (wasm_binary_target ))
1685
- shared .Settings .ASMJS_CODE_FILE = shared .JS .escape_for_js_string (os .path .basename (asm_target ))
1686
1684
if options .use_closure_compiler == 2 and not shared .Settings .WASM2JS :
1687
1685
exit_with_error ('closure compiler mode 2 assumes the code is asm.js, so not meaningful for wasm' )
1688
1686
if any (s .startswith ('MEM_INIT_METHOD=' ) for s in settings_changes ):
@@ -2742,19 +2740,8 @@ def run_closure_compiler(final):
2742
2740
if '{{{ WASM_BINARY_DATA }}}' in js :
2743
2741
js = js .replace ('{{{ WASM_BINARY_DATA }}}' , base64_encode (open (wasm_binary_target , 'rb' ).read ()))
2744
2742
2745
- for target , replacement_string , should_embed in (
2746
- (wasm_binary_target ,
2747
- shared .FilenameReplacementStrings .WASM_BINARY_FILE ,
2748
- True ),
2749
- (asm_target ,
2750
- shared .FilenameReplacementStrings .ASMJS_CODE_FILE ,
2751
- False ),
2752
- ):
2753
- if should_embed and os .path .isfile (target ):
2754
- js = js .replace (replacement_string , shared .JS .get_subresource_location (target ))
2755
- else :
2756
- js = js .replace (replacement_string , '' )
2757
- shared .try_delete (target )
2743
+ js = js .replace (shared .FilenameReplacementStrings .WASM_BINARY_FILE , shared .JS .get_subresource_location (wasm_binary_target ))
2744
+ shared .try_delete (wasm_binary_target )
2758
2745
with open (final , 'w' ) as f :
2759
2746
f .write (js )
2760
2747
0 commit comments