Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rust: support the new
-Zub-checks
flag
Rust 1.79.0 has introduced a new codegen flag, `-Zub-checks` [1], to allow to independently configure (from `-Cdebug-assertions`) whether the extra runtime checks for UB are emitted, in a similar fashion to `-Coverflow-checks`. This allows to configure the kernel with only the UB checks enabled, but not the `debug_assert!`s; or vice versa, e.g. [2]. It also showcases how `RUSTC_VERSION` and the Kbuild macros, introduced in the previous commit, can be used. Link: rust-lang/compiler-team#725 [1] Link: https://godbolt.org/z/jY69ezx5K [2] Reviewed-by: Finn Behrens <[email protected]> Tested-by: Benno Lossin <[email protected]> Tested-by: Andreas Hindborg <[email protected]> Signed-off-by: Miguel Ojeda <[email protected]> Link: https://lore.kernel.org/r/[email protected]
- Loading branch information