Skip to content

Commit baea929

Browse files
committed
Remove ASMJS_CODE_FILE internal setting. NFC.
See: #11860
1 parent ac48964 commit baea929

File tree

3 files changed

+2
-19
lines changed

3 files changed

+2
-19
lines changed

emcc.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,12 +1677,10 @@ def include_and_export(name):
16771677
# placeholder strings for JS glue, to be replaced with subresource locations in do_binaryen
16781678
shared.Settings.WASM_TEXT_FILE = shared.FilenameReplacementStrings.WASM_TEXT_FILE
16791679
shared.Settings.WASM_BINARY_FILE = shared.FilenameReplacementStrings.WASM_BINARY_FILE
1680-
shared.Settings.ASMJS_CODE_FILE = shared.FilenameReplacementStrings.ASMJS_CODE_FILE
16811680
else:
16821681
# set file locations, so that JS glue can find what it needs
16831682
shared.Settings.WASM_TEXT_FILE = shared.JS.escape_for_js_string(os.path.basename(wasm_text_target))
16841683
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))
16861684
if options.use_closure_compiler == 2 and not shared.Settings.WASM2JS:
16871685
exit_with_error('closure compiler mode 2 assumes the code is asm.js, so not meaningful for wasm')
16881686
if any(s.startswith('MEM_INIT_METHOD=') for s in settings_changes):
@@ -2753,19 +2751,8 @@ def run_closure_compiler(final):
27532751
if '{{{ WASM_BINARY_DATA }}}' in js:
27542752
js = js.replace('{{{ WASM_BINARY_DATA }}}', base64_encode(open(wasm_binary_target, 'rb').read()))
27552753

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(target))
2755+
shared.try_delete(wasm_binary_target)
27692756
with open(final, 'w') as f:
27702757
f.write(js)
27712758

src/settings_internal.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,6 @@ var WASM_TEXT_FILE = '';
117117
// name of the file containing wasm binary, if relevant
118118
var WASM_BINARY_FILE = '';
119119

120-
// name of the file containing asm.js code, if relevant
121-
var ASMJS_CODE_FILE = '';
122-
123120
// name of the file containing the pthread *.worker.js, if relevant
124121
var PTHREAD_WORKER_FILE = '';
125122

tools/shared.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,6 @@ def reconfigure_cache():
10751075
class FilenameReplacementStrings:
10761076
WASM_TEXT_FILE = '{{{ FILENAME_REPLACEMENT_STRINGS_WASM_TEXT_FILE }}}'
10771077
WASM_BINARY_FILE = '{{{ FILENAME_REPLACEMENT_STRINGS_WASM_BINARY_FILE }}}'
1078-
ASMJS_CODE_FILE = '{{{ FILENAME_REPLACEMENT_STRINGS_ASMJS_CODE_FILE }}}'
10791078

10801079

10811080
class JS(object):

0 commit comments

Comments
 (0)