Use opt-level = "z" for release

On M1 MacOS Darwin 21.5, this produces binary that is 0.3M smaller while
taking 10s less to build.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-07-20 18:00:22 +10:00
parent 3a30e870b0
commit 6324f9a7ca
No known key found for this signature in database
GPG key ID: 591C0B03040416D6

View file

@ -78,7 +78,7 @@ mimalloc = ["dep:mimalloc"]
env_logger = "0.9.0"
[profile.release]
opt-level = "s"
opt-level = "z"
lto = true
codegen-units = 1
panic = "abort"