diff --git a/config.toml.example b/config.toml.example index d811b914d20a1..b63ff14d7d38d 100644 --- a/config.toml.example +++ b/config.toml.example @@ -423,6 +423,18 @@ changelog-seen = 2 # set this value to `true`. #debug-logging = rust.debug-assertions (boolean) +# Whether or not overflow checks are enabled for the compiler and standard +# library. +# +# Defaults to rust.debug value +#overflow-checks = rust.debug (boolean) + +# Whether or not overflow checks are enabled for the standard library. +# Overrides the `overflow-checks` option, if defined. +# +# Defaults to rust.overflow-checks value +#overflow-checks-std = rust.overflow-checks (boolean) + # Debuginfo level for most of Rust code, corresponds to the `-C debuginfo=N` option of `rustc`. # `0` - no debug info # `1` - line tables only - sufficient to generate backtraces that include line diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 062820040dc78..7818b8b7d515d 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -982,7 +982,8 @@ impl Config { config.rust_debug_assertions_std = debug_assertions_std.unwrap_or(config.rust_debug_assertions); config.rust_overflow_checks = overflow_checks.unwrap_or(default); - config.rust_overflow_checks_std = overflow_checks_std.unwrap_or(default); + config.rust_overflow_checks_std = + overflow_checks_std.unwrap_or(config.rust_overflow_checks); config.rust_debug_logging = debug_logging.unwrap_or(config.rust_debug_assertions); diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py index fd148d14478d8..94424cb4548fa 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py @@ -75,7 +75,9 @@ def v(*args): o("llvm-assertions", "llvm.assertions", "build LLVM with assertions") o("llvm-plugins", "llvm.plugins", "build LLVM with plugin interface") o("debug-assertions", "rust.debug-assertions", "build with debugging assertions") +o("debug-assertions-std", "rust.debug-assertions-std", "build the standard library with debugging assertions") o("overflow-checks", "rust.overflow-checks", "build with overflow checks") +o("overflow-checks-std", "rust.overflow-checks-std", "build the standard library with overflow checks") o("llvm-release-debuginfo", "llvm.release-debuginfo", "build LLVM with debugger metadata") v("debuginfo-level", "rust.debuginfo-level", "debuginfo level for Rust code") v("debuginfo-level-rustc", "rust.debuginfo-level-rustc", "debuginfo level for the compiler")