| 29 Mar 2026 |
whispers [& it/fae] | the final step is a full stage 2 build which builds standard libraries for several targets, documentation, and several other things | 19:34:34 |
dish [Fox/It/She] | why are we building std for several targets? is that so it can include wasm std, or is that something we could disable? | 19:35:09 |
whispers [& it/fae] | wasm and bfpel-* something, yeah | 19:35:23 |
whispers [& it/fae] | I'm not entirely sure why the mrustc end is slow, but i think it mostly boils down to the fact that it's a two stage build. the first stage is just building rustc with mrustc, but i think this makes stage 2 pretty slow because rustc is fairly reliant on optimizations, which mrustc doesn't do much of | 19:36:38 |
whispers [& it/fae] | but that's just my theory, i haven't looked into that side and there's a solid chance you could cut it down | 19:36:55 |
whispers [& it/fae] | you could maybe amortize that cost across 1.90 and 1.91 by making "stage 2" just be building 1.91 (but you may be prone to miscompilation since mrustc isn't tested like that, i don't know) | 19:38:49 |
dish [Fox/It/She] | okay you should be able to build without extra stdlibs by setting fastCross = true; in the final build derivation where you override rustc-unwrapped | 19:39:51 |
dish [Fox/It/She] | that also skips some other builds, quoting the code it "reuses the rustc from build" | 19:40:41 |
whispers [& it/fae] | for comparison, each of the intermediate builds compiles six things: bootstrap, rustc, standard libraries, cargo, rust-installer, and generate-copyright (and I'll rip out those last two as soon as i next decide to look into it) | 19:40:37 |
dish [Fox/It/She] | https://github.com/NixOS/nixpkgs/blob/46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9/pkgs/development/compilers/rust/rustc.nix#L39 | 19:40:45 |
whispers [& it/fae] | we don't want to do that, that phase is what builds rustc. doing a stage 2 build (theoretically) gives us the best binary for building everything else with | 19:41:40 |
whispers [& it/fae] | and is the "intended" way for rustc to be distributed | 19:41:57 |
whispers [& it/fae] | * | 19:42:24 |
dish [Fox/It/She] | yeah fair | 19:42:40 |
whispers [& it/fae] | i did notice some weird build steps, like that build logs say "Building stage2 compiler artifacts" with the same information two or three times, but i don't know if that's because the logging is lacking or something else. (that's not unique to this, you can see the same logs on hydra) | 19:44:07 |
whispers [& it/fae] | * i did notice some weird build steps, like that build logs say "Building stage2 compiler artifacts" with the same information two or three times, but i don't know if that's because the logging is lacking or it's actually running duplicate builds. (that's not unique to this, you can see the same logs on hydra) | 19:44:27 |
whispers [& it/fae] | * | 19:44:49 |
whispers [& it/fae] | * | 19:44:59 |
whispers [& it/fae] | * | 19:45:16 |
whispers [& it/fae] | oh and stage 1 builds also break anything that links against rustc_private | 19:50:27 |
whispers [& it/fae] | i don't remember the machinery involved with doing that (it might be nightly only?) so i don't know if anything in nixpkgs does that though | 19:51:03 |
whispers [& it/fae] | * | 19:51:39 |
whispers [& it/fae] | * | 19:53:04 |
whispers [& it/fae] | * | 19:53:18 |
whispers [& it/fae] | okay yeah i think that's perma-unstable so basically a non-concern | 19:55:00 |
dish [Fox/It/She] | removing rust-installer and generate-copyright from intermediate builds should be fairly easy, just a few-line patch | 20:17:21 |
dish [Fox/It/She] | * removing rust-installer and generate-copyright from intermediate builds should be fairly easy, just a few-line patch from what i can see just looking at the code | 20:17:31 |
whispers [& it/fae] | i think you can also just do it by passing the right command like flags to ./x.py install (specifying which things to install instead of just using the defaults) but i haven't tried | 20:18:27 |
whispers [& it/fae] | * i think you can also just do it by passing the right command like flags to ./x.py install (specifying which things to install instead of just using the defaults) but I'll have to test that later | 20:20:36 |
whispers [& it/fae] | * i think you can also just do it by passing the right command line flags to ./x.py install (specifying which things to install instead of just using the defaults) but I'll have to test that later | 20:21:36 |