Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install a single target from source without building the whole compiler? #63553

Open
marmistrz opened this issue Aug 14, 2019 · 0 comments
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.

Comments

@marmistrz
Copy link
Contributor

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 or wasm32-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:

rustup target add wasm32-wasi

for x86_64-pc-windows-gnu:

rustup install stable-x86_64-pc-windows-gnu
rustup target add x86_64-pc-windows-gnu
@joelpalmer joelpalmer added 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. labels Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

2 participants