Skip to content

Investigate cross-compile dist tool flow incorrectly building {host,build} compilers #138004

Closed
@jieyouxu

Description

@jieyouxu

./x dist --stage=2 --host=... --target=... does the wrong thing:

  • Compiles build compiler from stage0 to stage1 (ok)
  • Compiles host compiler from stage1 to stage2(host) (ok)
  • Compiles host compiler from stage0 to stage1(host) (wrong, why is it doing this?)
  • Compiles build compiler from stage1 to stage2 (wrong, why is it doing this?)

./x dist --stage=1 --host=... --target=... also does the wrong thing:

  • Compiles host compiler from stage0 to stage1(host) (wrong, should be from stage1)
  • Compiles build compiler from stage0 to stage1 (ok)
  • Compiles host compiler from stage1 to stage2(host) (ok)

My expectations are:

  • Cross compiling versus not cross compiling should not require different stage settings. But you seem to be saying that we need to use different commands for those?
  • When compiling (either cross or not), it should:
    • build stage1 build compiler from stage0(build)
    • build stage2 host compiler from stage1(build)

From what I can tell, it seems to work correctly when not cross compiling.

Originally posted by @ehuss in #137476 (comment)

Metadata

Metadata

Labels

C-bugCategory: This is a bug.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