Skip to content

build should not bootstrap compilers for non-build-triple host compilers #5258

Closed
@brson

Description

@brson

When building a cross-compiled Rust compiler, e.g. building a rustc that runs on i686 from x86_64, we first bootstrap the 'A' compiler (x86), from stage0 to stage2, then we use the stage2 'A' compiler to build the stage0 'B' compiler (i686), and go through the entire bootstrap process again, building the 'B' compiler with itself.

This has some problems:

  1. It's inefficient, bootstrapping two compilers
  2. It's not necessary since the first 'B' compiler is built from a compiler that is already up to date
  3. It only works when 'A' is x86_64 and 'B' is i686 (or vice-versa), and both for the same OS, since there's no reason to assume that the 'B' compiler can even run on the 'A' compiler's architecture.

Fixing this is going to require some deep restructuring of the makefiles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions