Add options for enabling overflow checks in rustc and std.
The options are `overflow-checks` and `overflow-checks-std` defaulting to false.
This commit is contained in:
parent
49ca3d9796
commit
2f7095389d
4 changed files with 20 additions and 0 deletions
|
|
@ -1205,6 +1205,14 @@ impl<'a> Builder<'a> {
|
|||
self.config.rust_debug_assertions.to_string()
|
||||
},
|
||||
);
|
||||
cargo.env(
|
||||
profile_var("OVERFLOW_CHECKS"),
|
||||
if mode == Mode::Std {
|
||||
self.config.rust_overflow_checks_std.to_string()
|
||||
} else {
|
||||
self.config.rust_overflow_checks.to_string()
|
||||
},
|
||||
);
|
||||
|
||||
// `dsymutil` adds time to builds on Apple platforms for no clear benefit, and also makes
|
||||
// it more difficult for debuggers to find debug info. The compiler currently defaults to
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue