Skip to content

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

Open
@jyn514

Description

@jyn514

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-crossArea: Cross compilationA-download-rustcArea: The `rust.download-rustc` build option.C-enhancementCategory: An issue proposing an enhancement or a PR with one.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions