From 194bcaeae336b18c267ec393c55993bd13d4165c Mon Sep 17 00:00:00 2001 From: Eric Le Bihan Date: Sun, 4 Feb 2018 19:07:41 +0100 Subject: rust-bin: new package This package provides a pre-built version of rustc, the compiler for the Rust programming language, fetched from the upstream project. A pre-built version of the standard library for the host as well as one for the chosen target are also fetched and installed. Only the host variant is provided to allow the user to cross-compile Rust programs and run them on the target. This package could also be used to provide a bootstrap compiler when building Rust from source. So, in order to add it as a build dependency, the compiler and standard libraries are only installed in $(HOST_DIR) if the package is explicitly selected. The menuconfig entry for rustc is also updated to expose this provider. Signed-off-by: Eric Le Bihan Signed-off-by: Peter Korsgaard --- package/rustc/Config.in.host | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'package/rustc') diff --git a/package/rustc/Config.in.host b/package/rustc/Config.in.host index a49f635d65..66c50c4579 100644 --- a/package/rustc/Config.in.host +++ b/package/rustc/Config.in.host @@ -24,8 +24,37 @@ config BR2_PACKAGE_HOST_RUSTC_ABI default "eabihf" if BR2_ARM_EABIHF default "abi64" if BR2_MIPS_NABI64 +config BR2_PACKAGE_HOST_RUSTC + bool "host rustc" + depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS + help + Compiler for the Rust language + + http://www.rust-lang.org + +if BR2_PACKAGE_HOST_RUSTC + +choice + prompt "Rust compiler variant" + default BR2_PACKAGE_HOST_RUST_BIN + help + Select a Rust compiler + +config BR2_PACKAGE_HOST_RUST_BIN + bool "host rust (pre-built)" + select BR2_PACKAGE_HAS_HOST_RUSTC + help + This package will install pre-built versions of the compiler + for the host and the Rust standard library for the target. + +endchoice + config BR2_PACKAGE_HAS_HOST_RUSTC bool config BR2_PACKAGE_PROVIDES_HOST_RUSTC string + default "host-rust-bin" if BR2_PACKAGE_HOST_RUST_BIN + +endif + -- cgit v1.2.3