Commit 2143f48
rust: support the new
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]-Zub-checks flag1 parent 7255d40 commit 2143f48
2 files changed
+25
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
819 | 819 | | |
820 | 820 | | |
821 | 821 | | |
822 | | - | |
823 | | - | |
| 822 | + | |
824 | 823 | | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
825 | 827 | | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
826 | 831 | | |
827 | 832 | | |
828 | 833 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3020 | 3020 | | |
3021 | 3021 | | |
3022 | 3022 | | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
| 3027 | + | |
| 3028 | + | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
| 3032 | + | |
| 3033 | + | |
| 3034 | + | |
| 3035 | + | |
| 3036 | + | |
| 3037 | + | |
| 3038 | + | |
| 3039 | + | |
| 3040 | + | |
3023 | 3041 | | |
3024 | 3042 | | |
3025 | 3043 | | |
| |||
0 commit comments