Skip to content

download-rustc should support a cross-compiled host #110411

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

Open
jyn514 opened this issue Apr 16, 2023 · 1 comment
Open

download-rustc should support a cross-compiled host #110411

jyn514 opened this issue Apr 16, 2023 · 1 comment
Labels
A-cross Area: Cross compilation A-download-rustc Area: The `rust.download-rustc` build option. C-enhancement Category: An issue proposing an enhancement or a PR with one. E-hard Call for participation: Hard difficulty. Experience needed to fix: A lot. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@jyn514
Copy link
Member

jyn514 commented Apr 16, 2023

Here is how download-rustc currently behaves when cross-compiling:

; x b --host i686-unknown-linux-gnu std
Building {std} stage2 library artifacts (x86_64-unknown-linux-gnu -> i686-unknown-linux-gnu)
Build completed successfully in 0:00:00
; x b --host i686-unknown-linux-gnu rustc
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `x86_64-unknown-linux-gnu`,
 right: `i686-unknown-linux-gnu`: Cross-compiling is not yet supported with `download-rustc`', compile.rs:1280:13
Build completed unsuccessfully in 0:00:00

Ideally, this would "just work": download rustc for stage 1, then rebuild stage 2 for the other target. This will be annoyingly slow because it also has to build llvm from source, but it's better than building both llvm and rustc twice.

@jyn514 jyn514 added E-hard Call for participation: Hard difficulty. Experience needed to fix: A lot. A-cross Area: Cross compilation T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-download-rustc Area: The `rust.download-rustc` build option. labels Apr 16, 2023
@jyn514
Copy link
Member Author

jyn514 commented Apr 16, 2023

Found while investigating #110051 (comment).

@Enselic Enselic added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cross Area: Cross compilation A-download-rustc Area: The `rust.download-rustc` build option. C-enhancement Category: An issue proposing an enhancement or a PR with one. E-hard Call for participation: Hard difficulty. Experience needed to fix: A lot. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

2 participants