-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
mk: Bootstrap from stable instead of snapshots #32942
Conversation
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
a894fc0
to
dc4b0b1
Compare
r? @brson This commit moves us to bootstrapping from the recently-produced 1.9 beta compiler as a proof-of-concept for both the makefiles and rustbuild. cc @dhuseby, @mneumann, @semarie -- this will unfortunately break BSD bootstraps for the near future. We don't have stable releases for platforms like OpenBSD, Bitrig, or DragonFly (we do for FreeBSD/NetBSD now), but we'd have to hook up some more automation to get this working. In the interim we can perhaps produce releases after the fact for these platforms, but it would be best if we could figure out how to cross-compile these platforms from Linux (like FreeBSD and NetBSD are doing). That way we could hook everything up to our automation, make sure releases/nightlies are made, everything keeps building, etc. |
r=me but we should probably hear from the *BSD maintainers before going forward. |
@alexcrichton so we should all focus on getting cross-compiling from linux to work? that's trivial for netbsd and probably works for freebsd, but openbsd is likely much harder due to the use of older/custom versions of the gnu toolchain. I know that bitrig will be very difficult as they rely solely on clang and libc++. Convincing Linux to only use that toolchain and libraries is not trivial. The last time I figure it out it looked like this:
|
@alexcrichton I'm all for figuring this out as the CI will be much more uniform and cleaner. |
For now, yeah, that's our best option for keeping these platforms going. We can very easily set up and manage bots to cross-compile to each BSD, but running dedicated BSD hardware is a much bigger headache for us we aren't willing to stomach just yet.
Indeed! We've got nightlies/betas for both of them :)
Yeah this is kinda unfortunate :(. There may not be any way to cross from Linux in the long run. In general this doesn't necessarily mean "game over" for the BSDs, it may just mean that we periodically upload a new beta for each BSD. We probably don't want to push stable releases just yet unless we've got "more confidence" in them, but we could also perhaps do that as well! In essence this'll just mean that new BSD "snapshots" will need to happen on a 6-week cadence |
@alexcrichton I don't see any problems with this change for DragonFly. We are already using FreeBSD's ports infrastructure for building rustc (with some minor patches) and I think the FreeBSD ports maintainers will do all the work for us :) |
dc4b0b1
to
3244b75
Compare
☔ The latest upstream changes (presumably #32960) made this pull request unmergeable. Please resolve the merge conflicts. |
3244b75
to
cfc260e
Compare
@alexcrichton if I correctly understand, for openbsd it will be required to generate a -beta release each 6 weeks (if not crosscompile possibility) ? for me, it won't be a big problem: I could generate it for upload. does snap3 buildbots will be converted to beta buildbots ? |
☔ The latest upstream changes (presumably #32895) made this pull request unmergeable. Please resolve the merge conflicts. |
@semarie yeah if we want to keep nightly OpenBSD compiling we'll basically need to simulate a beta release for these platforms whenever a beta is built (this includes beta updates as well if we switch to bootstrapping from them). We'll be retiring the snap3 buildbots and we do indeed have a suite of beta buildbots. We could add an OpenBSD one there, but I'm not sure the snap3 bots have ever produced an OpenBSD snapshot successfully so we may not have much luck with the beta ones either :( (this is where cross-compiling to OpenBSD is the easiest route for us) |
39e4944
to
baccb8f
Compare
☔ The latest upstream changes (presumably #32755) made this pull request unmergeable. Please resolve the merge conflicts. |
c757d35
to
d291511
Compare
@bors r+ |
📌 Commit d291511 has been approved by |
@bors: r- Gah just realized the travis error is probably legit. |
d291511
to
7a3ac97
Compare
@bors: r=brson 7a3ac97 |
⌛ Testing commit 7a3ac97 with merge 04e9d72... |
💔 Test failed - auto-linux-64-x-freebsd |
This commit removes all infrastructure from the repository for our so-called snapshots to instead bootstrap the compiler from stable releases. Bootstrapping from a previously stable release is a long-desired feature of distros because they're not fans of downloading binary stage0 blobs from us. Additionally, this makes our own CI easier as we can decommission all of the snapshot builders and start having a regular cadence to when we update the stage0 compiler. A new `src/etc/get-stage0.py` script was added which shares some code with `src/bootstrap/bootstrap.py` to read a new file, `src/stage0.txt`, which lists the current stage0 compiler as well as cargo that we bootstrap from. This script will download the relevant `rustc` package an unpack it into `$target/stage0` as we do today. One problem of bootstrapping from stable releases is that we're not able to compile unstable code (e.g. all the `#![feature]` directives in libcore/libstd). To overcome this we employ two strategies: * The bootstrap key of the previous compiler is hardcoded into `src/stage0.txt` (enabled as a result of rust-lang#32731) and exported by the build system. This enables nightly features in the compiler we download. * The standard library and compiler are pinned to a specific stage0, which doesn't change, so we're guaranteed that we'll continue compiling as we start from a known fixed source. The process for making a release will also need to be tweaked now to continue to cadence of bootstrapping from the previous release. This process looks like: 1. Merge `beta` to `stable` 2. Produce a new stable compiler. 3. Change `master` to bootstrap from this new stable compiler. 4. Merge `master` to `beta` 5. Produce a new beta compiler 6. Change `master` to bootstrap from this new beta compiler. Step 3 above should involve very few changes as `master` was previously bootstrapping from `beta` which is the same as `stable` at that point in time. Step 6, however, is where we benefit from removing lots of `#[cfg(stage0)]` and get to use new features. This also shouldn't slow the release too much as steps 1-5 requires little work other than waiting and step 6 just needs to happen at some point during a release cycle, it's not time sensitive. Closes rust-lang#29555 Closes rust-lang#29557
7a3ac97
to
02538d4
Compare
⌛ Testing commit 02538d4 with merge 31ffdf4... |
@bors: retry force |
⌛ Testing commit 02538d4 with merge cc0dada... |
💔 Test failed - auto-win-msvc-32-opt |
@bors: retry On Tuesday, April 19, 2016, bors notifications@github.com wrote:
|
mk: Bootstrap from stable instead of snapshots This commit removes all infrastructure from the repository for our so-called snapshots to instead bootstrap the compiler from stable releases. Bootstrapping from a previously stable release is a long-desired feature of distros because they're not fans of downloading binary stage0 blobs from us. Additionally, this makes our own CI easier as we can decommission all of the snapshot builders and start having a regular cadence to when we update the stage0 compiler. A new `src/etc/get-stage0.py` script was added which shares some code with `src/bootstrap/bootstrap.py` to read a new file, `src/stage0.txt`, which lists the current stage0 compiler as well as cargo that we bootstrap from. This script will download the relevant `rustc` package an unpack it into `$target/stage0` as we do today. One problem of bootstrapping from stable releases is that we're not able to compile unstable code (e.g. all the `#![feature]` directives in libcore/libstd). To overcome this we employ two strategies: * The bootstrap key of the previous compiler is hardcoded into `src/stage0.txt` (enabled as a result of #32731) and exported by the build system. This enables nightly features in the compiler we download. * The standard library and compiler are pinned to a specific stage0, which doesn't change, so we're guaranteed that we'll continue compiling as we start from a known fixed source. The process for making a release will also need to be tweaked now to continue to cadence of bootstrapping from the previous release. This process looks like: 1. Merge `beta` to `stable` 2. Produce a new stable compiler. 3. Change `master` to bootstrap from this new stable compiler. 4. Merge `master` to `beta` 5. Produce a new beta compiler 6. Change `master` to bootstrap from this new beta compiler. Step 3 above should involve very few changes as `master` was previously bootstrapping from `beta` which is the same as `stable` at that point in time. Step 6, however, is where we benefit from removing lots of `#[cfg(stage0)]` and get to use new features. This also shouldn't slow the release too much as steps 1-5 requires little work other than waiting and step 6 just needs to happen at some point during a release cycle, it's not time sensitive. Closes #29555 Closes #29557
Unsupport wget wget support was removed in rust-lang#32942 (search for wget in diff), but configure wasn't updated. wget support was introduced in rust-lang#7498 for Windows, but we now use PowerShell on Windows.
This commit removes all infrastructure from the repository for our so-called
snapshots to instead bootstrap the compiler from stable releases. Bootstrapping
from a previously stable release is a long-desired feature of distros because
they're not fans of downloading binary stage0 blobs from us. Additionally, this
makes our own CI easier as we can decommission all of the snapshot builders and
start having a regular cadence to when we update the stage0 compiler.
A new
src/etc/get-stage0.py
script was added which shares some code withsrc/bootstrap/bootstrap.py
to read a new file,src/stage0.txt
, which liststhe current stage0 compiler as well as cargo that we bootstrap from. This script
will download the relevant
rustc
package an unpack it into$target/stage0
aswe do today.
One problem of bootstrapping from stable releases is that we're not able to
compile unstable code (e.g. all the
#![feature]
directives in libcore/libstd).To overcome this we employ two strategies:
src/stage0.txt
(enabled as a result of mk: Hardcode the bootstrap key for each release #32731) and exported by the build system. This enables
nightly features in the compiler we download.
doesn't change, so we're guaranteed that we'll continue compiling as we start
from a known fixed source.
The process for making a release will also need to be tweaked now to continue to
cadence of bootstrapping from the previous release. This process looks like:
beta
tostable
master
to bootstrap from this new stable compiler.master
tobeta
master
to bootstrap from this new beta compiler.Step 3 above should involve very few changes as
master
was previouslybootstrapping from
beta
which is the same asstable
at that point in time.Step 6, however, is where we benefit from removing lots of
#[cfg(stage0)]
andget to use new features. This also shouldn't slow the release too much as steps
1-5 requires little work other than waiting and step 6 just needs to happen at
some point during a release cycle, it's not time sensitive.
Closes #29555
Closes #29557