You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rust: build_error: remove RUST_BUILD_ASSERT_WARN support
There are several problems with `RUST_BUILD_ASSERT_WARN`:
- ld.lld behaves differently than ld.bfd and emits warnings even
when all calls are correct and optimized away in `DENY` mode.
This could be solved by restricting the `WARN` mode so that
it can only be used when the GNU linker is used.
- Since we need to export the `rust_build_error` for loadable
kernel modules, even ld.bfd considers that as a use.
- For loadable modules, we do not get warnings since the section
is in `build_error`, not the module.
These last two issues may be possible to solve all by creating
a symbol and section per loadable kernel module.
While all the above may be possible to solve, supporting the `WARN`
mode gets more complex and it is not worth to support. It was
introduced back when we had configurable optimization levels, but
nowadays optimizations are always enabled. Therefore, `DENY` is
probably good enough for all use cases, with `ALLOW` being
the escape hatch.
Thus remove the `WARN` support.
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
0 commit comments