mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Add production-stripped cargo profile (#32651)
* Add production-stripped cargo profile Stripping the binary significantly reduces the size significantly (in my tests to about 1/3 of the original size). Enabling lto and setting `codegen-units = 1` allows further size optimizations at the cost of increased compile-time. Probably not everyone wants a stripped binary, since it makes backtraces less useful. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Move lto and cgu option to production profile Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> --------- Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
This commit is contained in:
parent
7b324074b5
commit
bd0a5eb4b7
1 changed files with 6 additions and 0 deletions
|
@ -152,6 +152,12 @@ debug-assertions = true
|
|||
[profile.production]
|
||||
inherits = "release"
|
||||
debug-assertions = false
|
||||
lto = "thin"
|
||||
codegen-units = 1
|
||||
|
||||
[profile.production-stripped]
|
||||
inherits = "production"
|
||||
strip = true
|
||||
|
||||
[patch.crates-io]
|
||||
# If you need to temporarily test Servo with a local fork of some upstream
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue