Bug 1698295 - Build glsl with opt-level=2 to improve build times. r=glandium

This changes reduces the time spent in swgl shader translation
from 24s to 12s.

Differential Revision: https://phabricator.services.mozilla.com/D108327
This commit is contained in:
Jeff Muizelaar 2021-03-16 14:28:07 +00:00
parent 71ab76aea6
commit 3c8ae4c16e
2 changed files with 14 additions and 0 deletions

View File

@ -66,6 +66,13 @@ opt-level = 1
[profile.release.build-override]
opt-level = 1
# optimizing glsl more makes a big difference in swgl build times
[profile.dev.package.glsl]
opt-level = 2
[profile.release.package.glsl]
opt-level = 2
[patch.crates-io]
chardetng = { git = "https://github.com/hsivonen/chardetng", rev="fd4ed671ef495af4dcda4c4cba3ef8d426db8af1" }
chardetng_c = { git = "https://github.com/hsivonen/chardetng_c", rev="ed8a4c6f900a90d4dbc1d64b856e61490a1c3570" }

View File

@ -16,6 +16,13 @@ panic = "abort"
[profile.dev]
panic = "abort"
# optimizing glsl more makes a big difference in swgl build times
[profile.dev.package.glsl]
opt-level = 2
[profile.release.package.glsl]
opt-level = 2
# Running wrench on android built with master cargo-apk results in a crash
# due to a mismatched version of android_glue (a dependency of winit).
# Override it to use a suitable version of android_glue.