From 78521f3399abce9bb9db16d848044be873e117ac Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Thu, 4 Aug 2022 12:25:53 +0200 Subject: scripts: add `rust_is_available.sh` This script tests whether the Rust toolchain requirements are in place to enable Rust support. It uses `min-tool-version.sh` to fetch the version numbers. The build system will call it to set `CONFIG_RUST_IS_AVAILABLE` in a later patch. It also has an option (`-v`) to explain what is missing, which is useful to set up the development environment. This is used via the `make rustavailable` target added in a later patch. Reviewed-by: Kees Cook Co-developed-by: Alex Gaynor Signed-off-by: Alex Gaynor Co-developed-by: Wedson Almeida Filho Signed-off-by: Wedson Almeida Filho Co-developed-by: Finn Behrens Signed-off-by: Finn Behrens Co-developed-by: Miguel Cano Signed-off-by: Miguel Cano Co-developed-by: Tiago Lam Signed-off-by: Tiago Lam Signed-off-by: Miguel Ojeda --- scripts/min-tool-version.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts/min-tool-version.sh') diff --git a/scripts/min-tool-version.sh b/scripts/min-tool-version.sh index 250925aab101..b6593eac5003 100755 --- a/scripts/min-tool-version.sh +++ b/scripts/min-tool-version.sh @@ -30,6 +30,12 @@ llvm) echo 11.0.0 fi ;; +rustc) + echo 1.62.0 + ;; +bindgen) + echo 0.56.0 + ;; *) echo "$1: unknown tool" >&2 exit 1 -- cgit v1.2.3