scripts: add `generate_rust_target.rs`
authorMiguel Ojeda <ojeda@kernel.org>
Thu, 4 Aug 2022 10:20:37 +0000 (12:20 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Wed, 28 Sep 2022 07:02:06 +0000 (09:02 +0200)
commit9a8ff24ce584ad9895f9416fe8fad6f8842f758d
tree5aec580be399df9b4564264b0746943e6a5b6216
parent8c4555ccc55cf90e1e3eb2507be3c354f3d15839
scripts: add `generate_rust_target.rs`

This script takes care of generating the custom target specification
file for `rustc`, based on the kernel configuration.

It also serves as an example of a Rust host program.

A dummy architecture is kept in this patch so that a later patch
adds x86 support on top with as few changes as possible.

Reviewed-by: Kees Cook <keescook@chromium.org>
Co-developed-by: Alex Gaynor <alex.gaynor@gmail.com>
Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>
Co-developed-by: Wedson Almeida Filho <wedsonaf@google.com>
Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
Co-developed-by: David Gow <davidgow@google.com>
Signed-off-by: David Gow <davidgow@google.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
scripts/.gitignore
scripts/generate_rust_target.rs [new file with mode: 0644]