We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
x clean
1 parent 9d49eb7 commit bf0de6cCopy full SHA for bf0de6c
src/bootstrap/src/core/build_steps/clean.rs
@@ -149,8 +149,14 @@ fn clean_default(build: &Build) {
149
rm_rf(&build.out.join("bootstrap-shims-dump"));
150
rm_rf(&build.out.join("rustfmt.stamp"));
151
152
- for host in &build.hosts {
153
- let entries = match build.out.join(host.triple).read_dir() {
+ let mut hosts: Vec<_> = build.hosts.iter().map(|t| build.out.join(t.triple)).collect();
+ // After cross-compilation, artifacts of the host architecture (which may differ from build.host)
154
+ // might not get removed.
155
+ // Adding its path (linked one for easier accessibility) will solve this problem.
156
+ hosts.push(build.out.join("host"));
157
+
158
+ for host in hosts {
159
+ let entries = match host.read_dir() {
160
Ok(iter) => iter,
161
Err(_) => continue,
162
};
0 commit comments