@@ -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 ):
@@ -2753,19 +2751,8 @@ def run_closure_compiler(final):
2753
2751
if '{{{ WASM_BINARY_DATA }}}' in js :
2754
2752
js = js .replace ('{{{ WASM_BINARY_DATA }}}' , base64_encode (open (wasm_binary_target , 'rb' ).read ()))
2755
2753
2756
- for target , replacement_string , should_embed in (
2757
- (wasm_binary_target ,
2758
- shared .FilenameReplacementStrings .WASM_BINARY_FILE ,
2759
- True ),
2760
- (asm_target ,
2761
- shared .FilenameReplacementStrings .ASMJS_CODE_FILE ,
2762
- False ),
2763
- ):
2764
- if should_embed and os .path .isfile (target ):
2765
- js = js .replace (replacement_string , shared .JS .get_subresource_location (target ))
2766
- else :
2767
- js = js .replace (replacement_string , '' )
2768
- shared .try_delete (target )
2754
+ js = js .replace (shared .FilenameReplacementStrings .WASM_BINARY_FILE , shared .JS .get_subresource_location (wasm_binary_target ))
2755
+ shared .try_delete (wasm_binary_target )
2769
2756
with open (final , 'w' ) as f :
2770
2757
f .write (js )
2771
2758
0 commit comments