mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
Kbuild: add Rust support
Having most of the new files in place, we now enable Rust support in the build system, including `Kconfig` entries related to Rust, the Rust configuration printer and a few other bits. Reviewed-by: Kees Cook <keescook@chromium.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Tested-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Co-developed-by: Alex Gaynor <alex.gaynor@gmail.com> Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com> Co-developed-by: Finn Behrens <me@kloenk.de> Signed-off-by: Finn Behrens <me@kloenk.de> Co-developed-by: Adam Bratschi-Kaye <ark.email@gmail.com> Signed-off-by: Adam Bratschi-Kaye <ark.email@gmail.com> Co-developed-by: Wedson Almeida Filho <wedsonaf@google.com> Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com> Co-developed-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Co-developed-by: Sven Van Asbroeck <thesven73@gmail.com> Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com> Co-developed-by: Gary Guo <gary@garyguo.net> Signed-off-by: Gary Guo <gary@garyguo.net> Co-developed-by: Boris-Chengbiao Zhou <bobo1239@web.de> Signed-off-by: Boris-Chengbiao Zhou <bobo1239@web.de> Co-developed-by: Boqun Feng <boqun.feng@gmail.com> Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Co-developed-by: Douglas Su <d0u9.su@outlook.com> Signed-off-by: Douglas Su <d0u9.su@outlook.com> Co-developed-by: Dariusz Sosnowski <dsosnowski@dsosnowski.pl> Signed-off-by: Dariusz Sosnowski <dsosnowski@dsosnowski.pl> Co-developed-by: Antonio Terceiro <antonio.terceiro@linaro.org> Signed-off-by: Antonio Terceiro <antonio.terceiro@linaro.org> Co-developed-by: Daniel Xu <dxu@dxuuu.xyz> Signed-off-by: Daniel Xu <dxu@dxuuu.xyz> Co-developed-by: Björn Roy Baron <bjorn3_gh@protonmail.com> Signed-off-by: Björn Roy Baron <bjorn3_gh@protonmail.com> Co-developed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> Signed-off-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
@@ -2710,6 +2710,40 @@ config HYPERV_TESTING
|
||||
|
||||
endmenu # "Kernel Testing and Coverage"
|
||||
|
||||
menu "Rust hacking"
|
||||
|
||||
config RUST_DEBUG_ASSERTIONS
|
||||
bool "Debug assertions"
|
||||
depends on RUST
|
||||
help
|
||||
Enables rustc's `-Cdebug-assertions` codegen option.
|
||||
|
||||
This flag lets you turn `cfg(debug_assertions)` conditional
|
||||
compilation on or off. This can be used to enable extra debugging
|
||||
code in development but not in production. For example, it controls
|
||||
the behavior of the standard library's `debug_assert!` macro.
|
||||
|
||||
Note that this will apply to all Rust code, including `core`.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config RUST_OVERFLOW_CHECKS
|
||||
bool "Overflow checks"
|
||||
default y
|
||||
depends on RUST
|
||||
help
|
||||
Enables rustc's `-Coverflow-checks` codegen option.
|
||||
|
||||
This flag allows you to control the behavior of runtime integer
|
||||
overflow. When overflow-checks are enabled, a Rust panic will occur
|
||||
on overflow.
|
||||
|
||||
Note that this will apply to all Rust code, including `core`.
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
endmenu # "Rust"
|
||||
|
||||
source "Documentation/Kconfig"
|
||||
|
||||
endmenu # Kernel hacking
|
||||
|
||||
Reference in New Issue
Block a user