Optimized shrink options to binaryen wasm-opt pass

This commit is contained in:
Jordan Schidlowsky 2024-09-25 10:13:57 -06:00
parent 0a9d8f04c1
commit a95dfa6ea0
1 changed files with 3 additions and 0 deletions

View File

@ -285,6 +285,9 @@ def configure(env: "SConsEnvironment"):
env.Append(CCFLAGS=["-sSUPPORT_LONGJMP='wasm'"])
env.Append(LINKFLAGS=["-sSUPPORT_LONGJMP='wasm'"])
# Run wasm-opt binaryen maximum shrink options
env.Append(LINKFLAGS=["-sBINARYEN_EXTRA_PASSES='-Oz'"])
# Allow increasing memory buffer size during runtime. This is efficient
# when using WebAssembly (in comparison to asm.js) and works well for
# us since we don't know requirements at compile-time.