-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Re-bootstrapping from the *current* release #29556
Comments
A self-rebuild will be required if there is any need to regenerate the Rust package. Rust x.y will already be in the distro buildroot, thus the prior x.(y-1) is no longer available, but perhaps we need to apply some bugfix or security patch to Rust, or relink due to a changed dependency, etc. (Actually, I'm not sure how that will technically work, if something like LLVM gets rebased and we need to simultaneously use the old and link against the new. But that's a distro issue.) Anyway, I may be able to work on this bug with some light mentoring hints. Can someone point to a starting point? |
This might be easier as part of rustbuild rather than the makefiles (as it's in theory easier to read the dependency list). If you want to dive into the makefiles, the relevant targets start around here for libraries. For rustbuild, the list of dependencies show up in this file. In rustbuild at least, this would probably look like:
As for the Makefiles, well, I would perhaps avoid touching them if I were you :) |
I've been banging my head on the makefiles, but I think I just had a eureka moment to simplify this. We don't actually need to skip any stages -- we just need to adjust how the stage0->1 build is configured. That's basically just the choice of |
@alexcrichton, could you please take at look at this gist patch? I don't expect it to be mergable yet, which is why I didn't open a PR, but I hope to get your opinion on the approach. Basically as I mentioned above, this still goes through all the same stages, but it treats the snapshot/local compiler as if it already has the stage1 features and the same bootstrap key. |
Looks reasonable to me! I'm not sure if it was intended to skip the bootstrap as part of this issue, but the plumbing there is at least what I'd expect |
Add --enable-local-rebuild to bootstrap from the current release In Linux distributions, it is often necessary to rebuild packages for cases like applying new patches or linking against new system libraries. In this scenario, the rustc in the distro build environment may already match the current release that we're trying to rebuild. Thus we don't want to use the prior release's bootstrap key, nor `--cfg stage0` for the prior unstable features. The new `configure --enable-local-rebuild` option specifies that we are rebuilding from the current release. The current bootstrap key is used for the local rustc, and current stage1 features are also assumed. Both the makefiles and rustbuild support this configuration. Fixes #29556 r? @alexcrichton
In some scenarios (I've forgotten offhand), distros want to rebuild the compiler using itself. This is more-or-less equivalent to starting the build at stage 2.
We'll provide a way in the Makefile to do this easily.
re https://internals.rust-lang.org/t/perfecting-rust-packaging-the-plan/2767
The text was updated successfully, but these errors were encountered: