Bug 1352815 - "codegen-units = 4" for Rust code in debug mode
MozReview-Commit-ID: IIFVmijY4B3
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -470,17 +470,17 @@ class TreeMetadataEmitter(LoggingMixin):
if libname in ('gkrust', 'gkrust-gtest'):
if profile_name == 'dev':
expected_profile = {
'opt-level': 1,
'debug': True,
'rpath': False,
'lto': False,
'debug-assertions': True,
- 'codegen-units': 1,
+ 'codegen-units': 4,
'panic': 'abort',
}
else:
expected_profile = {
'opt-level': 2,
'debug': True,
'rpath': False,
'lto': True,
--- a/toolkit/library/gtest/rust/Cargo.toml
+++ b/toolkit/library/gtest/rust/Cargo.toml
@@ -27,17 +27,17 @@ harness = false
# Explicitly specify what our profiles use.
[profile.dev]
opt-level = 1
debug = true
rpath = false
lto = false
debug-assertions = true
-codegen-units = 1
+codegen-units = 4
panic = "abort"
[profile.release]
opt-level = 2
debug = true
rpath = false
lto = true
debug-assertions = false
--- a/toolkit/library/rust/Cargo.toml
+++ b/toolkit/library/rust/Cargo.toml
@@ -25,17 +25,17 @@ harness = false
# Explicitly specify what our profiles use.
[profile.dev]
opt-level = 1
debug = true
rpath = false
lto = false
debug-assertions = true
-codegen-units = 1
+codegen-units = 4
panic = "abort"
[profile.release]
opt-level = 2
debug = true
rpath = false
lto = true
debug-assertions = false