-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
integrate incremental into rustbuild.py #37929
Comments
./configure is a second-class citizen in rustbuild. Instead it should be described in terms of options on config.toml. |
Hm we've talked about this before and I think we're on the same page, but I got lost here in the terminology of stages. Perhaps you could list out the steps of how you expect the bootstrap to proceed with incremental enabled? |
@alexcrichton here is what I imagined:
I think that's... it? |
Ok, sounds good to me! Effectively that's two changes to the bootstrap (at least by my terminology)
The first step, skipping stage0, will not always work. That's the "keep your nightly up to date" problem. The second step, skipping stage2, should in theory always work. Our bots will likely assert it'll work whereas most users can just assume it works to avoid extra compiles. |
Wait, this doesn't sound quite right. I think the bootstrap compiler becomes the "local rust" (i.e., whatever is on the path). In that case, we are assuming that the current stage0 compiler is not what would have been generated but rather something very close to it, right? In particular, metadata-compatible. (I think the only place we make that assumption is if we try to copy the libs.) |
Though reading your comment again I think we are both saying the same thing, but in different ways. |
Er yes, right. That's what we are fundamentally assuming, metadata-compatible. That's normally guaranteed of a stage1 compiler because we just built it, but because we're skipping that portion we're assuming it. (I do think we're saying the same thing) Bootstrapping is hard |
@alexcrichton I suppose, more accurately, metadata and ABI compatible. |
add preliminary support for incremental compilation to rustbuild.py This implements the integration described in #37929. It requires the use of a local nightly as your bootstrap compiler. The setup is described in `src/bootstrap/README.md`. This does NOT implement the "copy stage0 libs to stage1" optimization described in #37929, just because that seems orthogonal to me. In local testing, I do not yet see any incremental re-use when building rustc. I'm not sure why that is, more investigation needed. (For these reasons, this is not marked as fixing the relevant issue.) r? @alexcrichton -- I included one random cleanup (`Step::noop()`) that turned out to not be especially relevant. Feel free to tell me you liked it better the old way.
Fixed by #38072 |
I had a beautiful writeup of The Plan (tm) here but I accidentally closed the tab. D'oh. So here goes the summarized version:
--incremental
option to configure. It will imply--enable-local-rust
and--enable-local-build
-- meaning that instead of beta, we'll bootstrap with the local nightly. You have to manage this yourself with rustup. Stay up to date.--incremental
will also imply a default target of stage1.cc @alexcrichton @michaelwoerister, sound right?
The text was updated successfully, but these errors were encountered: