Add a profiling build profile in Cargo (#33432)

* Add a profiling build profile in Cargo

Signed-off-by: Delan Azabani <dazabani@igalia.com>

* Redefine the profiling profile in terms of release

Signed-off-by: Delan Azabani <dazabani@igalia.com>

* Remove the other profiles added for testing

Signed-off-by: Delan Azabani <dazabani@igalia.com>

* Enable ThinLTO, like we do in production profiles

Signed-off-by: Delan Azabani <dazabani@igalia.com>

---------

Signed-off-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
Delan Azabani 2024-09-19 20:07:15 +08:00 committed by GitHub
parent 06f0893b94
commit eecf5bdea1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -152,9 +152,6 @@ xml5ever = "0.20"
[profile.release]
opt-level = 3
debug-assertions = true
# Uncomment to profile on Linux:
# debug = true
# lto = false
[profile.production]
inherits = "release"
@ -166,6 +163,13 @@ codegen-units = 1
inherits = "production"
strip = true
[profile.profiling]
inherits = "release"
debug-assertions = false
debug = true
lto = "thin"
codegen-units = 1
[patch.crates-io]
# If you need to temporarily test Servo with a local fork of some upstream
# crate, add that here. Use the form: