about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--config.toml.example12
-rw-r--r--src/bootstrap/config.rs3
-rwxr-xr-xsrc/bootstrap/configure.py2
3 files changed, 16 insertions, 1 deletions
diff --git a/config.toml.example b/config.toml.example
index d811b914d20..b63ff14d7d3 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 062820040dc..7818b8b7d51 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 fd148d14478..94424cb4548 100755
--- a/src/bootstrap/configure.py
+++ b/src/bootstrap/configure.py
@@ -75,7 +75,9 @@ o("optimize-llvm", "llvm.optimize", "build optimized LLVM")
 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")