diff options
author | Eric Le Bihan <eric.le.bihan.dev@free.fr> | 2018-02-04 19:07:41 +0100 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2018-02-05 14:57:47 +0100 |
commit | 194bcaeae336b18c267ec393c55993bd13d4165c (patch) | |
tree | 9d85aac45ec4173d6b33310402ee1eee33bb06d9 /package/rustc | |
parent | 40e6e08d0b1a241ae4175952d4b2a22fdde5a48d (diff) | |
download | buildroot-194bcaeae336b18c267ec393c55993bd13d4165c.tar.gz buildroot-194bcaeae336b18c267ec393c55993bd13d4165c.zip |
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 <eric.le.bihan.dev@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/rustc')
-rw-r--r-- | package/rustc/Config.in.host | 29 |
1 files changed, 29 insertions, 0 deletions
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 + |