From 1b47e8fa998f6d76d536594955336fe0327f894e Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Sat, 20 Jun 2020 10:56:47 +0200 Subject: [PATCH 1/5] examples should be of type bool --- config.toml.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.toml.example b/config.toml.example index bc6760334170b..a918feb278f62 100644 --- a/config.toml.example +++ b/config.toml.example @@ -313,11 +313,11 @@ # Whether or not debug assertions are enabled for the compiler and standard # library. -#debug-assertions = debug +#debug-assertions = false # Whether or not debug assertions are enabled for the standard library. # Overrides the `debug-assertions` option, if defined. -#debug-assertions-std = debug-assertions +#debug-assertions-std = false # Debuginfo level for most of Rust code, corresponds to the `-C debuginfo=N` option of `rustc`. # `0` - no debug info From 16e741c8e941f887a5db02ebd60d9a69624fbc0b Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Sat, 20 Jun 2020 13:22:13 +0200 Subject: [PATCH 2/5] explain the logic a bit --- config.toml.example | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/config.toml.example b/config.toml.example index a918feb278f62..e214bf048980d 100644 --- a/config.toml.example +++ b/config.toml.example @@ -313,10 +313,12 @@ # Whether or not debug assertions are enabled for the compiler and standard # library. +# Defaults to rust.debug value. #debug-assertions = false # Whether or not debug assertions are enabled for the standard library. # Overrides the `debug-assertions` option, if defined. +# Defaults to rust.debug value. #debug-assertions-std = false # Debuginfo level for most of Rust code, corresponds to the `-C debuginfo=N` option of `rustc`. @@ -326,16 +328,21 @@ # Can be overridden for specific subsets of Rust code (rustc, std or tools). # Debuginfo for tests run with compiletest is not controlled by this option # and needs to be enabled separately with `debuginfo-level-tests`. -#debuginfo-level = if debug { 2 } else { 0 } +# +# If debug is true, this defaults to 2. +#debuginfo-level = 0 # Debuginfo level for the compiler. -#debuginfo-level-rustc = debuginfo-level +# Defaults to rust.debuginfo-level value. +#debuginfo-level-rustc = 0 # Debuginfo level for the standard library. -#debuginfo-level-std = debuginfo-level +# Defaults to rust.debuginfo-level value. +#debuginfo-level-std = 0 # Debuginfo level for the tools. -#debuginfo-level-tools = debuginfo-level +# Defaults to rust.debuginfo-level value. +#debuginfo-level-tools = 0 # Debuginfo level for the test suites run with compiletest. # FIXME(#61117): Some tests fail when this option is enabled. From e84552e5dcb5b21de1528d7c42406a4b9ae9afe9 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Mon, 22 Jun 2020 17:07:42 +0200 Subject: [PATCH 3/5] be more consistent with "defaults" placement --- config.toml.example | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/config.toml.example b/config.toml.example index e214bf048980d..9ffaac0bbd002 100644 --- a/config.toml.example +++ b/config.toml.example @@ -173,9 +173,7 @@ # Python interpreter to use for various tasks throughout the build, notably # rustdoc tests, the lldb python interpreter, and some dist bits and pieces. -# -# Defaults to the Python interpreter used to execute x.py. -#python = "python" +#python = "python" # defaults to the Python interpreter used to execute x.py # Force Cargo to check that Cargo.lock describes the precise dependency # set that all the Cargo.toml files create, instead of updating it. @@ -313,13 +311,11 @@ # Whether or not debug assertions are enabled for the compiler and standard # library. -# Defaults to rust.debug value. -#debug-assertions = false +#debug-assertions = false # defaults to rust.debug value # Whether or not debug assertions are enabled for the standard library. # Overrides the `debug-assertions` option, if defined. -# Defaults to rust.debug value. -#debug-assertions-std = false +#debug-assertions-std = false # defaults to rust.debug value # Debuginfo level for most of Rust code, corresponds to the `-C debuginfo=N` option of `rustc`. # `0` - no debug info @@ -328,21 +324,16 @@ # Can be overridden for specific subsets of Rust code (rustc, std or tools). # Debuginfo for tests run with compiletest is not controlled by this option # and needs to be enabled separately with `debuginfo-level-tests`. -# -# If debug is true, this defaults to 2. -#debuginfo-level = 0 +#debuginfo-level = 0 # defaults to 2 if debug is true # Debuginfo level for the compiler. -# Defaults to rust.debuginfo-level value. -#debuginfo-level-rustc = 0 +#debuginfo-level-rustc = 0 # defaults to rust.debuginfo-level value # Debuginfo level for the standard library. -# Defaults to rust.debuginfo-level value. -#debuginfo-level-std = 0 +#debuginfo-level-std = 0 # defaults to rust.debuginfo-level value # Debuginfo level for the tools. -# Defaults to rust.debuginfo-level value. -#debuginfo-level-tools = 0 +#debuginfo-level-tools = 0 # defaults to rust.debuginfo-level value # Debuginfo level for the test suites run with compiletest. # FIXME(#61117): Some tests fail when this option is enabled. From b65ea1bef1391a3af9118884952718fc905f8e02 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Tue, 23 Jun 2020 00:29:55 +0200 Subject: [PATCH 4/5] place non-obvious defaults on a separate line See https://github.com/rust-lang/rust/pull/73538#discussion_r443809593 for the motivation --- config.toml.example | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/config.toml.example b/config.toml.example index 9ffaac0bbd002..79b06d5cf9962 100644 --- a/config.toml.example +++ b/config.toml.example @@ -118,18 +118,24 @@ # nightlies are already produced for. The current platform must be able to run # binaries of this build triple and the nightly will be used to bootstrap the # first compiler. -#build = "x86_64-unknown-linux-gnu" # defaults to your host platform +# +# Defaults to host platform +#build = "x86_64-unknown-linux-gnu" # In addition to the build triple, other triples to produce full compiler # toolchains for. Each of these triples will be bootstrapped from the build # triple and then will continue to bootstrap themselves. This platform must # currently be able to run all of the triples provided here. -#host = ["x86_64-unknown-linux-gnu"] # defaults to just the build triple +# +# Defaults to just the build triple +#host = ["x86_64-unknown-linux-gnu"] # In addition to all host triples, other triples to produce the standard library # for. Each host triple will be used to produce a copy of the standard library # for each target triple. -#target = ["x86_64-unknown-linux-gnu"] # defaults to just the build triple +# +# Defaults to just the build triple +#target = ["x86_64-unknown-linux-gnu"] # Use this directory to store build artifacts. # You can use "$ROOT" to indicate the root of the git repository. @@ -173,7 +179,9 @@ # Python interpreter to use for various tasks throughout the build, notably # rustdoc tests, the lldb python interpreter, and some dist bits and pieces. -#python = "python" # defaults to the Python interpreter used to execute x.py +# +# Defaults to the Python interpreter used to execute x.py +#python = "python" # Force Cargo to check that Cargo.lock describes the precise dependency # set that all the Cargo.toml files create, instead of updating it. @@ -311,11 +319,15 @@ # Whether or not debug assertions are enabled for the compiler and standard # library. -#debug-assertions = false # defaults to rust.debug value +# +# Defaults to rust.debug value +#debug-assertions = false # Whether or not debug assertions are enabled for the standard library. # Overrides the `debug-assertions` option, if defined. -#debug-assertions-std = false # defaults to rust.debug value +# +# Defaults to rust.debug value +#debug-assertions-std = false # Debuginfo level for most of Rust code, corresponds to the `-C debuginfo=N` option of `rustc`. # `0` - no debug info @@ -324,16 +336,24 @@ # Can be overridden for specific subsets of Rust code (rustc, std or tools). # Debuginfo for tests run with compiletest is not controlled by this option # and needs to be enabled separately with `debuginfo-level-tests`. -#debuginfo-level = 0 # defaults to 2 if debug is true +# +# Defaults to 2 if debug is true +#debuginfo-level = 0 # Debuginfo level for the compiler. -#debuginfo-level-rustc = 0 # defaults to rust.debuginfo-level value +# +# Defaults to rust.debuginfo-level value +#debuginfo-level-rustc = 0 # Debuginfo level for the standard library. -#debuginfo-level-std = 0 # defaults to rust.debuginfo-level value +# +# Defaults to rust.debuginfo-level value +#debuginfo-level-std = 0 # Debuginfo level for the tools. -#debuginfo-level-tools = 0 # defaults to rust.debuginfo-level value +# +# Defaults to rust.debuginfo-level value +#debuginfo-level-tools = 0 # Debuginfo level for the test suites run with compiletest. # FIXME(#61117): Some tests fail when this option is enabled. From b23baa78dc96cd12a70556de6bc472af3ef2e302 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Wed, 24 Jun 2020 04:47:20 +0200 Subject: [PATCH 5/5] fix See https://github.com/rust-lang/rust/pull/73538/commits/b65ea1bef1391a3af9118884952718fc905f8e02#r444376289 --- config.toml.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.toml.example b/config.toml.example index 79b06d5cf9962..c0be7dded17bc 100644 --- a/config.toml.example +++ b/config.toml.example @@ -326,7 +326,7 @@ # Whether or not debug assertions are enabled for the standard library. # Overrides the `debug-assertions` option, if defined. # -# Defaults to rust.debug value +# Defaults to rust.debug-assertions value #debug-assertions-std = false # Debuginfo level for most of Rust code, corresponds to the `-C debuginfo=N` option of `rustc`.