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

rustbuild: Compile all support tools in stage0 #38667

Merged
merged 1 commit into from
Dec 31, 2016

Conversation

alexcrichton
Copy link
Member

This commit changes all tools and such to get compiled in stage0, not in
later stages. The purpose of this commit is to cut down dependencies on later
stages for future modifications to the build system. Notably we're going to be
adding builders that produce a full suite of cross-compiled artifacts for a
particular host, and that shouldn't compile the x86_64-unknown-linux-gnu
compiler more than once. Currently dependencies on, for example, the error index
end up compiling the x86_64-unknown-linux-gnu compiler more than necessary.

As a result here we move many dependencies on these tools to being produced by a
stage0 compiler, not a stage1+ compiler. None of these tools actually need to be
staged at all, so they'll exhibit consistent behavior across the stages.

@rust-highfive
Copy link
Collaborator

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member Author

This is done in preparation for more bullets on #38531. Our cross-host builds are supposed to look like:

  • Compile an x86_64-unknown-linux-gnu compiler
  • Using that, compile a arm-unknown-linux-gnueabi compiler (or whatever target is configured)
  • Build release artifacts for std, rustc, docs, etc.

That is, when creating a cross-compiled compiler we should only create two compilers. Currently with the way the bootstrap is configured producing documentation for a cross-compiled target requires a host compiler in stage2, which results in an extra compilation of an x86_64-unknown-linux-gnu compiler that shouldn't be necessary. The purpose of this commit is to lower the dependencies of various tools and things to stage0 to ensure that we don't actually require this extra compile but can get away with just two compilers when doing a cross-host build.

@bors
Copy link
Contributor

bors commented Dec 30, 2016

☔ The latest upstream changes (presumably #38697) made this pull request unmergeable. Please resolve the merge conflicts.

This commit changes all tools and such to get compiled in stage0, not in
later stages. The purpose of this commit is to cut down dependencies on later
stages for future modifications to the build system. Notably we're going to be
adding builders that produce a full suite of cross-compiled artifacts for a
particular host, and that shouldn't compile the `x86_64-unknown-linux-gnu`
compiler more than once. Currently dependencies on, for example, the error index
end up compiling the `x86_64-unknown-linux-gnu` compiler more than necessary.

As a result here we move many dependencies on these tools to being produced by a
stage0 compiler, not a stage1+ compiler. None of these tools actually need to be
staged at all, so they'll exhibit consistent behavior across the stages.
@alexcrichton
Copy link
Member Author

Rebased

@brson
Copy link
Contributor

brson commented Dec 31, 2016

@bors r+

@bors
Copy link
Contributor

bors commented Dec 31, 2016

📌 Commit 254876e has been approved by brson

@bors
Copy link
Contributor

bors commented Dec 31, 2016

⌛ Testing commit 254876e with merge f29a9a2...

bors added a commit that referenced this pull request Dec 31, 2016
rustbuild: Compile all support tools in stage0

This commit changes all tools and such to get compiled in stage0, not in
later stages. The purpose of this commit is to cut down dependencies on later
stages for future modifications to the build system. Notably we're going to be
adding builders that produce a full suite of cross-compiled artifacts for a
particular host, and that shouldn't compile the `x86_64-unknown-linux-gnu`
compiler more than once. Currently dependencies on, for example, the error index
end up compiling the `x86_64-unknown-linux-gnu` compiler more than necessary.

As a result here we move many dependencies on these tools to being produced by a
stage0 compiler, not a stage1+ compiler. None of these tools actually need to be
staged at all, so they'll exhibit consistent behavior across the stages.
@bors
Copy link
Contributor

bors commented Dec 31, 2016

☀️ Test successful - status-appveyor, status-travis
Approved by: brson
Pushing f29a9a2 to master...

@bors bors merged commit 254876e into rust-lang:master Dec 31, 2016
@alexcrichton alexcrichton deleted the stage0-tools branch January 1, 2017 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants