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] Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Link: https://lore.kernel.org/r/20240701183625.665574-13-ojeda@kernel.org
- Loading branch information