Bug 1352815 - "codegen-units = 4" for Rust code in debug mode draft
authorSimon Sapin <simon.sapin@exyr.org>
Sun, 02 Apr 2017 14:17:44 +0200
changeset 554757 2bd2065a4bc86bd8779bd09a3297027fc804ebe9
parent 554756 896992d97d7c684b8eac6bf576e72d032f86b18b
child 622432 46a0dea551290b788be1fce8c2dd01d12b942d8e
push id52045
push userbmo:simon.sapin@exyr.org
push dateSun, 02 Apr 2017 12:18:24 +0000
bugs1352815
milestone55.0a1
Bug 1352815 - "codegen-units = 4" for Rust code in debug mode MozReview-Commit-ID: IIFVmijY4B3
python/mozbuild/mozbuild/frontend/emitter.py
toolkit/library/gtest/rust/Cargo.toml
toolkit/library/rust/Cargo.toml
--- 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