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 @@ -185,7 +185,16 @@ fn compile_probe(rustc_bootstrap: bool) -> bool {
185
185
// file in OUT_DIR, which causes nonreproducible builds in build systems
186
186
// that treat the entire OUT_DIR as an artifact.
187
187
if let Err ( err) = fs:: remove_dir_all ( & out_subdir) {
188
- if err. kind ( ) != ErrorKind :: NotFound {
188
+ // libc::ENOTEMPTY
189
+ // Some filesystems (NFSv3) have timing issues under load where '.nfs*'
190
+ // dummy files can continue to get created for a short period after the
191
+ // probe command completes, breaking remove_dir_all.
192
+ // To be replaced with ErrorKind::DirectoryNotEmpty (Rust 1.83+).
193
+ const ENOTEMPTY : i32 = 39 ;
194
+
195
+ if !( err. kind ( ) == ErrorKind :: NotFound
196
+ || ( cfg ! ( target_os = "linux" ) && err. raw_os_error ( ) == Some ( ENOTEMPTY ) ) )
197
+ {
189
198
eprintln ! ( "Failed to clean up {}: {}" , out_subdir. display( ) , err) ;
190
199
process:: exit ( 1 ) ;
191
200
}
You can’t perform that action at this time.
0 commit comments