File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -203,7 +203,16 @@ fn compile_probe(rustc_bootstrap: bool) -> bool {
203203 // file in OUT_DIR, which causes nonreproducible builds in build systems
204204 // that treat the entire OUT_DIR as an artifact.
205205 if let Err ( err) = fs:: remove_dir_all ( & out_subdir) {
206- if err. kind ( ) != ErrorKind :: NotFound && err. kind ( ) != ErrorKind :: DirectoryNotEmpty {
206+ // libc::ENOTEMPTY
207+ // Some filesystems (NFSv3) have timing issues under load where '.nfs*'
208+ // dummy files can continue to get created for a short period after the
209+ // probe command completes, breaking remove_dir_all.
210+ // To be replaced with ErrorKind::DirectoryNotEmpty (Rust 1.83+).
211+ const ENOTEMPTY : i32 = 39 ;
212+
213+ if !( err. kind ( ) == ErrorKind :: NotFound
214+ || ( cfg ! ( target_os = "linux" ) && err. raw_os_error ( ) == Some ( ENOTEMPTY ) ) )
215+ {
207216 eprintln ! ( "Failed to clean up {}: {}" , out_subdir. display( ) , err) ;
208217 process:: exit ( 1 ) ;
209218 }
You can’t perform that action at this time.
0 commit comments