[llvm] Reland "[lit] Migrate lit to ProcessPoolExecutor (#202681)" (PR #209076)

Dmitry Vasilyev via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 29 11:23:53 PDT 2026


slydiman wrote:

Few Windows buidlbots periodically failed after this patch bacause cannot delete a temp dir

https://lab.llvm.org/buildbot/#/builders/155/builds/21998
https://lab.llvm.org/buildbot/#/builders/54/builds/21970
...
https://lab.llvm.org/buildbot/#/builders/54/builds/22633
https://lab.llvm.org/buildbot/#/builders/54/builds/22741
https://lab.llvm.org/buildbot/#/builders/54/builds/22839

We can try something like this
```
import os
import stat
import time

def remove_readonly(func, path, excinfo):
    os.chmod(path, stat.S_IWRITE)
    func(path)

# Inside execute_in_tmp_dir's finally block:
try:
    shutil.rmtree(tmp_dir, onerror=remove_readonly)
except Exception:
    time.sleep(0.5)  # Give Windows a moment to release handles
    try:
        shutil.rmtree(tmp_dir, onerror=remove_readonly)
    except Exception as e:
        lit_config.warning("Failed to delete temp directory...")
```

https://github.com/llvm/llvm-project/pull/209076


More information about the llvm-commits mailing list