Skip to content

Commit a95dfa6

Browse files
committed
Optimized shrink options to binaryen wasm-opt pass
1 parent 0a9d8f0 commit a95dfa6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

platform/web/detect.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,9 @@ def configure(env: "SConsEnvironment"):
285285
env.Append(CCFLAGS=["-sSUPPORT_LONGJMP='wasm'"])
286286
env.Append(LINKFLAGS=["-sSUPPORT_LONGJMP='wasm'"])
287287

288+
# Run wasm-opt binaryen maximum shrink options
289+
env.Append(LINKFLAGS=["-sBINARYEN_EXTRA_PASSES='-Oz'"])
290+
288291
# Allow increasing memory buffer size during runtime. This is efficient
289292
# when using WebAssembly (in comparison to asm.js) and works well for
290293
# us since we don't know requirements at compile-time.

0 commit comments

Comments
 (0)