]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #106168 - jyn514:clean-crates, r=Mark-Simulacrum
authorbors <bors@rust-lang.org>
Tue, 27 Dec 2022 13:04:08 +0000 (13:04 +0000)
committerbors <bors@rust-lang.org>
Tue, 27 Dec 2022 13:04:08 +0000 (13:04 +0000)
Allow cleaning individual crates

As a bonus, this stops special casing `clean` in `Builder`.

## Motivation

Cleaning artifacts isn't strictly necessary to get cargo to rebuild; `touch compiler/rustc_driver/src/lib.rs` (for example) will also work. There's two reasons I thought making this part of bootstrap proper was a better approach:
1. `touch` does not *remove* artifacts, it just causes a rebuild. This is unhelpful for when you want to measure how long the compiler itself takes to build (e.g. for https://github.com/rust-lang/rust/issues/65031).
2. It seems a little more discoverable; and I want to extend it in the future to things like `x clean --stage 1 rustc`, which makes it easier to work around https://github.com/rust-lang/rust/issues/76720 without having to completely wipe all the stage 0 artifacts, or having to be intimately familiar with which directories to remove.

1  2 
src/bootstrap/flags.rs
src/bootstrap/lib.rs

Simple merge
Simple merge