How to install a single target from source without building the whole compiler? #63553
Labels
A-cross
Area: Cross compilation
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I'm using Arch Linux and my distribution provides a (usually) up-to-date version of rustc & cargo. In particular, I have a system-wide copy of the
x86_64-unknown-linux-gnu
, placed in/usr/lib/rustlib
. Please note that rustup is not used here at all.Sometimes I need to cross-compile to other targets, such as
x86_64-pc-windows-gnu
orwasm32-wasi
. This has issues, for instance #49078. It also results in unnecessary duplication.Currently it's possible to build a Rust cross compiler manually, such as the rust-mingw AUR package. Still, this requires building the whole LLVM, compiler, cargo, which takes a lot of time and this is basically emulation of rustup without rustup (there are separate copies of rustc, cargo, etc.)
Is it possible to only compile the required bits, so that one can just supplement the existing system-wide instance of Rust with new target? We can assume that their version will match.
For reference, the rustup steps for
wasm32-wasi
are:for
x86_64-pc-windows-gnu
:The text was updated successfully, but these errors were encountered: