@@ -2800,40 +2800,21 @@ config RUST_OVERFLOW_CHECKS
2800
2800
2801
2801
If unsure, say Y.
2802
2802
2803
- choice
2804
- prompt "Build-time assertions"
2805
- default RUST_BUILD_ASSERT_DENY
2803
+ config RUST_BUILD_ASSERT_ALLOW
2804
+ bool "Allow unoptimized build-time assertions"
2806
2805
depends on RUST
2807
2806
help
2808
2807
Controls how are `build_error!` and `build_assert!` handled during build.
2809
2808
2810
2809
If calls to them exist in the binary, it may indicate a violated invariant
2811
2810
or that the optimizer failed to verify the invariant during compilation.
2812
- You can choose to abort compilation or ignore them during build and let the
2813
- check be carried to runtime.
2814
-
2815
- If optimizations are turned off, you cannot select "Deny".
2816
-
2817
- If unsure, say "Deny".
2818
-
2819
- config RUST_BUILD_ASSERT_ALLOW
2820
- bool "Allow"
2821
- help
2822
- Unoptimized calls to `build_error!` will be converted to `panic!`
2823
- and checked at runtime.
2824
-
2825
- config RUST_BUILD_ASSERT_WARN
2826
- bool "Warn"
2827
- help
2828
- Unoptimized calls to `build_error!` will be converted to `panic!`
2829
- and checked at runtime, but warnings will be generated when building.
2830
2811
2831
- config RUST_BUILD_ASSERT_DENY
2832
- bool "Deny"
2833
- help
2834
- Unoptimized calls to `build_error!` will abort compilation .
2812
+ This should not happen, thus by default the build is aborted. However,
2813
+ as an escape hatch, you can choose Y here to ignore them during build
2814
+ and let the check be carried at runtime (with `panic!` being called if
2815
+ the check fails) .
2835
2816
2836
- endchoice
2817
+ If unsure, say N.
2837
2818
2838
2819
config RUST_KERNEL_KUNIT_TEST
2839
2820
bool "KUnit test for the `kernel` crate" if !KUNIT_ALL_TESTS
0 commit comments