Change default optimizations pass to focus on code size

Sergej Kostjucenko requested to merge hc-bump-size-opt into master

Created by: HCastano

This PR changes the default optimization option passed to wasm-opt from -O3 to -Os-Oz. This saves us around 0.2-0.3K according to these rough benchmarks.

The default wasn't set to -Oz as I saw no noticeable size improvements, and it just takes more time to run. However, you could also argue that since contracts are in general quite small the extra time for -Oz is negligible so we should enable it anyways.

While I could be convinced of this, I'm not sure what hardware other people build on, and the negative impact the change to -Oz could have for them.

Merge request reports