Skip to content

Commit 43396e6

Browse files
authored
Remove ASMJS_CODE_FILE internal setting. NFC. (#12158)
See: #11860
1 parent c27617a commit 43396e6

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):
@@ -2742,19 +2740,8 @@ def run_closure_compiler(final):
27422740
if '{{{ WASM_BINARY_DATA }}}' in js:
27432741
js = js.replace('{{{ WASM_BINARY_DATA }}}', base64_encode(open(wasm_binary_target, 'rb').read()))
27442742

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)
27582745
with open(final, 'w') as f:
27592746
f.write(js)
27602747

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
@@ -1067,7 +1067,6 @@ def reconfigure_cache():
10671067
class FilenameReplacementStrings:
10681068
WASM_TEXT_FILE = '{{{ FILENAME_REPLACEMENT_STRINGS_WASM_TEXT_FILE }}}'
10691069
WASM_BINARY_FILE = '{{{ FILENAME_REPLACEMENT_STRINGS_WASM_BINARY_FILE }}}'
1070-
ASMJS_CODE_FILE = '{{{ FILENAME_REPLACEMENT_STRINGS_ASMJS_CODE_FILE }}}'
10711070

10721071

10731072
class JS(object):

0 commit comments

Comments
 (0)