Bug 1436251 - Set codegen-units=1 in --enable-release; r?froydnj
MozReview-Commit-ID: 8kGTFAXfB2i
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -550,16 +550,17 @@ class TreeMetadataEmitter(LoggingMixin):
'panic': 'abort',
}
else:
expected_profile = {
'opt-level': 2,
'rpath': False,
'debug-assertions': False,
'panic': 'abort',
+ 'codegen-units': 1,
}
if profile != expected_profile:
raise SandboxValidationError(
'Cargo profile.%s for %s is incorrect' % (profile_name, libname),
context)
cargo_target_dir = context.get('RUST_LIBRARY_TARGET_DIR', '.')
--- a/toolkit/library/gtest/rust/Cargo.toml
+++ b/toolkit/library/gtest/rust/Cargo.toml
@@ -40,12 +40,13 @@ debug-assertions = true
codegen-units = 4
panic = "abort"
[profile.release]
opt-level = 2
rpath = false
debug-assertions = false
panic = "abort"
+codegen-units = 1
[patch.crates-io]
libudev-sys = { path = "../../../../dom/webauthn/libudev-sys" }
serde_derive = { git = "https://github.com/gankro/serde", branch = "deserialize_from_enums4", feature = "deserialize_in_place" }
--- a/toolkit/library/rust/Cargo.toml
+++ b/toolkit/library/rust/Cargo.toml
@@ -40,12 +40,13 @@ debug-assertions = true
codegen-units = 4
panic = "abort"
[profile.release]
opt-level = 2
rpath = false
debug-assertions = false
panic = "abort"
+codegen-units = 1
[patch.crates-io]
libudev-sys = { path = "../../../dom/webauthn/libudev-sys" }
serde_derive = { git = "https://github.com/gankro/serde", branch = "deserialize_from_enums4", feature = "deserialize_in_place" }