Skip to content
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

CI is bootstrapping rustc too many times on cross builds #44132

Closed
alexcrichton opened this issue Aug 28, 2017 · 4 comments
Closed

CI is bootstrapping rustc too many times on cross builds #44132

alexcrichton opened this issue Aug 28, 2017 · 4 comments
Labels
T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@alexcrichton
Copy link
Member

I just looked at a recent build, specifically for dist-s390x-linux, which was taking much longer than expected! I specifically noticed that the compiler is getting bootstrapped more than I would have expected.

All we should be building is a stage0 x86_64, stage1 x86_64, and stage1 s390x. Instead though we also see:

  • Building stage2 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
  • Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -> s390x-unknown-linux-gnu)

That's two whole extra compiler we shouldn't need!

@alexcrichton alexcrichton added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Aug 28, 2017
@alexcrichton
Copy link
Member Author

cc @Mark-Simulacrum, @kennytm

@alexcrichton alexcrichton changed the title CI is bootstrap rustc too many times on cross builds CI is bootstrapping rustc too many times on cross builds Aug 28, 2017
@kennytm
Copy link
Member

kennytm commented Aug 28, 2017

From the log, the compiler is built 5 times:

  1. Build stage0-rustc (x64 → x64) at 00:07:28, this is normal.
  2. Build stage1-rustc (x64 → x64) at 00:22:26, this is normal.
  3. Build stage2-rustc (x64 → x64) at 00:45:54, required to build the stage2 rustdoc (x64) to document libstd at stage2. Maybe we should document at stage1? Does it work when rustdoc starts to depend on proc-macro crates?
  4. Build stage1-rustc (x64 → s390x) at 01:09:38, this is normal.
  5. Build stage0-rustc (x64 → s390x) at 01:29:17, seems to be needed to extract the error index (s390x) judging from the step immediately after??

@alexcrichton
Copy link
Member Author

Yeah the (3) and (5) in your list there shouldn't be necessary, although this may take some rearchitecting of the build slightly to get that working.

@Mark-Simulacrum
Copy link
Member

Yeah, I've been meaning to work on having the build less split up into stages. Most of the things we build don't care about what stage they're associated with but it's also not always clear what stage and host triple they want to be associated with. It's going to require some thought and work, but I hope to get a plan soon.

bors added a commit that referenced this issue Aug 30, 2017
rustbuild: Avoid some extraneous rustc compiles on cross builds

This tweaks a few locations here and there to avoid compiling rustc too many times on our cross-builders on CI.

Closes #44132
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

3 participants