From 3b4a346de72c3fa12b69dbcdc12116ba865ab50e Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Sun, 30 Aug 2020 22:23:53 -0400 Subject: [PATCH 1/5] Fix incorrect wording for `verbose-tests` This info was lost in https://github.com/rust-lang/rust/pull/74334. --- config.toml.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.toml.example b/config.toml.example index 9abb8add785a9..424ede9cd1b65 100644 --- a/config.toml.example +++ b/config.toml.example @@ -392,7 +392,7 @@ # desired in distributions, for example. #rpath = true -# Emits extra output from tests so test failures are debuggable just from logfiles. +# Emits extra output from the tests to debug issues in the test harness itself. #verbose-tests = false # Flag indicating whether tests are compiled with optimizations (the -O flag). From d983873cff7467e457bb5b3904ae7c238ffc2d38 Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Sun, 30 Aug 2020 22:35:12 -0400 Subject: [PATCH 2/5] Document the defaults for `codegen-units` --- config.toml.example | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config.toml.example b/config.toml.example index 424ede9cd1b65..dd322c75932ca 100644 --- a/config.toml.example +++ b/config.toml.example @@ -309,6 +309,9 @@ # Number of codegen units to use for each compiler invocation. A value of 0 # means "the number of cores on this machine", and 1+ is passed through to the # compiler. +# +# Defaults: the Cargo defaults, 256 with incremental and 16 without +# https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units #codegen-units = 1 # Sets the number of codegen units to build the standard library with, From 41c13826f89665a4cf05c2e7ae470cb38fc699bc Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Sun, 30 Aug 2020 22:40:16 -0400 Subject: [PATCH 3/5] Mention why you'd want codegen-units = 0 (other than running out of RAM) --- config.toml.example | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config.toml.example b/config.toml.example index dd322c75932ca..2aba9445084de 100644 --- a/config.toml.example +++ b/config.toml.example @@ -306,6 +306,9 @@ # #debug = false +# This will make your build more parallel; it costs a bit of runtime +# performance perhaps (less inlining) but it's worth it. +# # Number of codegen units to use for each compiler invocation. A value of 0 # means "the number of cores on this machine", and 1+ is passed through to the # compiler. From 9f268de644df40c0ea9b323c475772d0ec2dc5b4 Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Mon, 31 Aug 2020 00:37:50 -0400 Subject: [PATCH 4/5] Address review comments - Use prettier syntax for codegen-units defaults - Remove comment about parallelism that only made sense for specific values of codegen-units - Be more specific about what `verbose-tests` does --- config.toml.example | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/config.toml.example b/config.toml.example index 2aba9445084de..0956dd82ad93e 100644 --- a/config.toml.example +++ b/config.toml.example @@ -306,16 +306,12 @@ # #debug = false -# This will make your build more parallel; it costs a bit of runtime -# performance perhaps (less inlining) but it's worth it. -# # Number of codegen units to use for each compiler invocation. A value of 0 # means "the number of cores on this machine", and 1+ is passed through to the # compiler. # -# Defaults: the Cargo defaults, 256 with incremental and 16 without -# https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units -#codegen-units = 1 +# Uses the Cargo defaults: https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units +#codegen-units = if incremental { 256 } else { 16 } # Sets the number of codegen units to build the standard library with, # regardless of what the codegen-unit setting for the rest of the compiler is. @@ -398,7 +394,7 @@ # desired in distributions, for example. #rpath = true -# Emits extra output from the tests to debug issues in the test harness itself. +# Prints each test name as it is executed, to help debug issues in the test harness itself. #verbose-tests = false # Flag indicating whether tests are compiled with optimizations (the -O flag). From ba664c258dd2f5516e987091a31acaa537312cf6 Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Tue, 1 Sep 2020 13:37:40 -0400 Subject: [PATCH 5/5] Codegen defaults come from rustc, not cargo --- config.toml.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.toml.example b/config.toml.example index 0956dd82ad93e..be23efae5294b 100644 --- a/config.toml.example +++ b/config.toml.example @@ -310,7 +310,7 @@ # means "the number of cores on this machine", and 1+ is passed through to the # compiler. # -# Uses the Cargo defaults: https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units +# Uses the rustc defaults: https://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units #codegen-units = if incremental { 256 } else { 16 } # Sets the number of codegen units to build the standard library with,