Skip to content

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

New issue

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

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

Already on GitHub? # to your account

Closed
jieyouxu opened this issue Mar 4, 2025 · 1 comment · Fixed by #138039
Closed
Assignees
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@jieyouxu
Copy link
Member

jieyouxu commented Mar 4, 2025

./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)

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 4, 2025
@jieyouxu jieyouxu added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 4, 2025
@jieyouxu
Copy link
Member Author

jieyouxu commented Mar 4, 2025

(Assigned Onur too since you said you wanted to look into it)

@jieyouxu jieyouxu changed the title Investigate dist tool flow incorrectly building {host,build} compilers Investigate cross-compile dist tool flow incorrectly building {host,build} compilers Mar 4, 2025
bors added a commit to rust-lang-ci/rust that referenced this issue Mar 5, 2025
…-tools, r=<try>

handle forced compiler and revert rust-lang#137476

Fixes rust-lang#138004

I would appreciate it if we could measure CI pipelines with the current changes to see if this reduces recent CI overhead. cc `@rust-lang/infra`

try-job: powerpc64le-unknown-linux-gnu
bors added a commit to rust-lang-ci/rust that referenced this issue Mar 5, 2025
…-tools, r=<try>

handle forced compiler and revert rust-lang#137476

Fixes rust-lang#138004

I would appreciate it if we could measure CI pipelines with the current changes to see if this reduces recent CI overhead. cc `@rust-lang/infra`

try-job: dist-powerpc64le-linux
bors added a commit to rust-lang-ci/rust that referenced this issue Mar 6, 2025
…-tools, r=jieyouxu

handle forced compiler and revert rust-lang#137476

Fixes rust-lang#138004

I would appreciate it if we could measure CI pipelines with the current changes to see if this reduces recent CI overhead. cc `@rust-lang/infra`

try-job: dist-powerpc64le-linux
@bors bors closed this as completed in e6af292 Mar 6, 2025
github-actions bot pushed a commit to rust-lang/miri that referenced this issue Mar 7, 2025
…=jieyouxu

handle forced compiler and revert #137476

Fixes rust-lang/rust#138004

I would appreciate it if we could measure CI pipelines with the current changes to see if this reduces recent CI overhead. cc `@rust-lang/infra`

try-job: dist-powerpc64le-linux
lnicola pushed a commit to lnicola/rust-analyzer that referenced this issue Mar 10, 2025
…=jieyouxu

handle forced compiler and revert #137476

Fixes rust-lang/rust#138004

I would appreciate it if we could measure CI pipelines with the current changes to see if this reduces recent CI overhead. cc `@rust-lang/infra`

try-job: dist-powerpc64le-linux
jieyouxu pushed a commit to jieyouxu/rustc-dev-guide that referenced this issue Mar 13, 2025
…=jieyouxu

handle forced compiler and revert #137476

Fixes rust-lang/rust#138004

I would appreciate it if we could measure CI pipelines with the current changes to see if this reduces recent CI overhead. cc `@rust-lang/infra`

try-job: dist-powerpc64le-linux
bors added a commit to rust-lang-ci/rust that referenced this issue Apr 20, 2025
ensure compiler existance of tools on the dist step

Fixes rust-lang#138778 with a coverage on rust-lang#138123 and rust-lang#138004.

try-job: dist-powerpc64le-linux
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Apr 25, 2025
ensure compiler existance of tools on the dist step

Fixes rust-lang#138778 with a coverage on rust-lang#138123 and rust-lang#138004.

try-job: dist-powerpc64le-linux
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Apr 25, 2025
Rollup merge of rust-lang#140006 - onur-ozkan:138778, r=onur-ozkan

ensure compiler existance of tools on the dist step

Fixes rust-lang#138778 with a coverage on rust-lang#138123 and rust-lang#138004.

try-job: dist-powerpc64le-linux
github-actions bot pushed a commit to rust-lang/miri that referenced this issue Apr 26, 2025
ensure compiler existance of tools on the dist step

Fixes rust-lang/rust#138778 with a coverage on rust-lang/rust#138123 and rust-lang/rust#138004.

try-job: dist-powerpc64le-linux
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants