Repository: rust
Issue: CI: spurious error building LLVM on mingw: `ranlib.exe: could not create temporary file whilst writing archive: no more archived files`
Labels: A-LLVM,T-compiler,O-windows-gnu,A-spurious,C-bug

```sh
# the specific codegen library differs, sometimes libLLVMSparcCodeGen.a, sometimes libLLVMM68kCodeGen.a, etc.
FAILED: lib/libLLVMSparcCodeGen.a
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E rm -f lib\libLLVMSparcCodeGen.a && D:\a\rust\rust\mingw32\bin\ar.exe qc lib\libLLVMSparcCodeGen.a  lib/Target/Sparc/CMakeFiles/LLVMSparcCodeGen.dir/DelaySlotFiller.cpp.obj lib/Target/Sparc/CMakeFiles/LLVMSparcCodeGen.dir/LeonPasses.cpp.obj lib/Target/Sparc/CMakeFiles/LLVMSparcCodeGen.dir/SparcAsmPrinter.cpp.obj lib/Target/Sparc/CMakeFiles/LLVMSparcCodeGen.dir/SparcInstrInfo.cpp.obj lib/Target/Sparc/CMakeFiles/LLVMSparcCodeGen.dir/SparcISelDAGToDAG.cpp.obj lib/Target/Sparc/CMakeFiles/LLVMSparcCodeGen.dir/SparcISelLowering.cpp.obj lib/Target/Sparc/CMakeFiles/LLVMSparcCodeGen.dir/SparcFrameLowering.cpp.obj lib/Target/Sparc/CMakeFiles/LLVMSparcCodeGen.dir/SparcMachineFunctionInfo.cpp.obj lib/Target/Sparc/CMakeFiles/LLVMSparcCodeGen.dir/SparcRegisterInfo.cpp.obj lib/Target/Sparc/CMakeFiles/LLVMSparcCodeGen.dir/SparcSubtarget.cpp.obj lib/Target/Sparc/CMakeFiles/LLVMSparcCodeGen.dir/SparcTargetMachine.cpp.obj lib/Target/Sparc/CMakeFiles/LLVMSparcCodeGen.dir/SparcMCInstLower.cpp.obj lib/Target/Sparc/CMakeFiles/LLVMSparcCodeGen.dir/SparcTargetObjectFile.cpp.obj && D:\a\rust\rust\mingw32\bin\ranlib.exe lib\libLLVMSparcCodeGen.a && cd ."
D:\a\rust\rust\mingw32\bin\ranlib.exe: could not create temporary file whilst writing archive: no more archived files
```

This has happened on quite a few PRs recently:
- https://github.com/rust-lang/rust/pull/102099#issuecomment-1430696912
- https://github.com/rust-lang/rust/pull/107772#issuecomment-1435830600
- https://github.com/rust-lang/rust/pull/107921#issuecomment-1429595804
- https://github.com/rust-lang/rust/pull/107830#issuecomment-1427261187
- https://github.com/rust-lang/rust/pull/107405#issuecomment-1427154633
- https://github.com/rust-lang/rust/pull/107084#issuecomment-1408161908
- https://github.com/rust-lang/rust/pull/108096#issuecomment-1433561275
- https://github.com/rust-lang/rust/pull/107949#issuecomment-1427004165
- https://github.com/rust-lang/rust/pull/107717#issuecomment-1421417213
- https://github.com/rust-lang/rust/pull/107693#issuecomment-1419970981
- https://github.com/rust-lang/rust/pull/107646#issuecomment-1416925643
- https://github.com/rust-lang/rust/pull/107463#issuecomment-1408513968
- https://github.com/rust-lang/rust/pull/107456#issuecomment-1407851956
- https://github.com/rust-lang/rust/pull/107449#issuecomment-1433384386
- https://github.com/rust-lang/rust/pull/107434#issuecomment-1418269091
- https://github.com/rust-lang/rust/pull/107197#issuecomment-1409292158
- https://github.com/rust-lang/rust/pull/106789#issuecomment-1420258371
- https://github.com/rust-lang/rust/pull/105670#issuecomment-1410522489
- https://github.com/rust-lang/rust/pull/103761#issuecomment-1419504319
- https://github.com/rust-lang/rust/pull/100754#issuecomment-1410293595

I've seen it happen on the following builders (all mingw builders I guess):
- `dist-i686-mingw`
- `i686-mingw-1`
- `i686-mingw-2`
- `dist-x86_64-mingw`
- `x86_64-mingw-2`

@rustbot label A-spurious A-LLVM O-Windows