Reducing disk usage to bootstrap rustc
Right now build script never cleanup build artefacts from previous steps which increases disc usage.
Maybe it is possible to clean things up?
Can you clarify which artefacts you feel could/should be automatically cleaned up? In general, they're kept around so that a failed build can be restarted cleanly... although that sometimes doesn't really apply.
@thepowersgang I'm thinking about something like bootstrap-lean from gcc build. The idea of bootstrap-lean is remove all compiling objects after the step's artefact is ready. And when step's artefact doesn't required anymore => remove it also.
What I'm thinking.
output-1.54.0/rustc-buildcan be removed afteroutput-1.54.0/rustcis ready (that reduces disk usage for more than 6Gb);output-1.54.0/cargo-buildcan be removed afteroutput-1.54.0/cargois ready (that reduces disk usage for more than 1Gb);output-1.54.0can be removed afterrun_rustc/output-1.54.0/prefix/bin/cargoandrun_rustc/output-1.54.0/prefix-s/bin/rustcis ready (that reduces disk usage for another ~0.8Gb)run_rustc/output-1.54.0/...can be removed then not needed.
To be honest (1) and (2) or just (3) makes huge win. Saves ~8Gb from ~14Gb of disk space usage.
What do you think?
A good idea, but that's not something I'd like to add to the default scripts as it'd make debugging much slower.