File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/bootstrap/src/core/build_steps Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -149,8 +149,14 @@ fn clean_default(build: &Build) {
149149 rm_rf ( & build. out . join ( "bootstrap-shims-dump" ) ) ;
150150 rm_rf ( & build. out . join ( "rustfmt.stamp" ) ) ;
151151
152- for host in & build. hosts {
153- let entries = match build. out . join ( host. triple ) . read_dir ( ) {
152+ let mut hosts: Vec < _ > = build. hosts . iter ( ) . map ( |t| build. out . join ( t. triple ) ) . collect ( ) ;
153+ // 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 ( ) {
154160 Ok ( iter) => iter,
155161 Err ( _) => continue ,
156162 } ;
You can’t perform that action at this time.
0 commit comments