Skip to content

Commit 76ef3ad

Browse files
authored
Rename internal MINIFY_ASMJS_EXPORT_NAMES setting. NFC (#18893)
1 parent e66f0e7 commit 76ef3ad

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

emcc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2491,7 +2491,7 @@ def check_memory_setting(setting):
24912491
# wasm module export names so that the names can be passed directly to the outer scope.
24922492
# Also, if using library_exports.js API, disable minification so that the feature can work.
24932493
if not settings.DECLARE_ASM_MODULE_EXPORTS or '-lexports.js' in [x for _, x in state.link_flags]:
2494-
settings.MINIFY_ASMJS_EXPORT_NAMES = 0
2494+
settings.MINIFY_WASM_EXPORT_NAMES = 0
24952495

24962496
if '-lembind' in [x for _, x in state.link_flags]:
24972497
settings.EMBIND = 1
@@ -2513,7 +2513,7 @@ def check_memory_setting(setting):
25132513
not settings.ASSERTIONS and \
25142514
not settings.RELOCATABLE and \
25152515
not settings.ASYNCIFY_LAZY_LOAD_CODE and \
2516-
settings.MINIFY_ASMJS_EXPORT_NAMES:
2516+
settings.MINIFY_WASM_EXPORT_NAMES:
25172517
settings.MINIFY_WASM_IMPORTS_AND_EXPORTS = 1
25182518
settings.MINIFY_WASM_IMPORTED_MODULES = 1
25192519

src/settings_internal.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ var MINIFY_WASM_IMPORTS_AND_EXPORTS = false;
166166
// Whether to minify imported module names.
167167
var MINIFY_WASM_IMPORTED_MODULES = false;
168168

169-
// Whether to minify functions exported from Asm.js/Wasm module.
170-
var MINIFY_ASMJS_EXPORT_NAMES = true;
169+
// Whether to minify exports from the Wasm module.
170+
var MINIFY_WASM_EXPORT_NAMES = true;
171171

172172
// Internal: represents a browser version that is not supported at all.
173173
var TARGET_NOT_SUPPORTED = 0x7FFFFFFF;

tools/building.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,10 @@ def minify_wasm_js(js_file, wasm_file, expensive_optimizations, minify_whitespac
745745
logger.debug('running post-meta-DCE cleanup on shell code: ' + ' '.join(passes))
746746
js_file = acorn_optimizer(js_file, passes)
747747
if settings.MINIFY_WASM_IMPORTS_AND_EXPORTS:
748-
js_file = minify_wasm_imports_and_exports(js_file, wasm_file, minify_whitespace=minify_whitespace, minify_exports=settings.MINIFY_ASMJS_EXPORT_NAMES, debug_info=debug_info)
748+
js_file = minify_wasm_imports_and_exports(js_file, wasm_file,
749+
minify_whitespace=minify_whitespace,
750+
minify_exports=settings.MINIFY_WASM_EXPORT_NAMES,
751+
debug_info=debug_info)
749752
return js_file
750753

751754

0 commit comments

Comments
 (0)