We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e41d9e3 commit cdf99a4Copy full SHA for cdf99a4
emcc.py
@@ -597,7 +597,9 @@ def backend_binaryen_passes():
597
# even if not optimizing, make an effort to remove all unused imports and
598
# exports, to make the wasm as standalone as possible
599
passes += ['--remove-unused-module-elements']
600
- if shared.Settings.GLOBAL_BASE >= 1024: # hardcoded value in the binaryen pass
+ # when optimizing, use the fact that low memory is never used (1024 is a
601
+ # hardcoded value in the binaryen pass)
602
+ if shared.Settings.OPT_LEVEL > 0 and shared.Settings.GLOBAL_BASE >= 1024:
603
passes += ['--low-memory-unused']
604
if shared.Settings.DEBUG_LEVEL < 3:
605
passes += ['--strip-debug']
0 commit comments