[Lldb-commits] [lldb] [lldb][Windows] Use extended path prefix for rmtree (PR #209409)
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 14 02:44:01 PDT 2026
================
@@ -846,7 +846,12 @@ def _ignore_enoent(func, path, exc_info):
return
raise exc_info[1]
- shutil.rmtree(bdir, onerror=_ignore_enoent)
+ # Delete via the \\?\ extended length path prefix so rmtree can
+ # remove build artifacts whose full path exceeds MAX_PATH (260).
+ rmtree_target = bdir
+ if sys.platform == "win32":
+ rmtree_target = "\\\\?\\" + bdir
+ shutil.rmtree(rmtree_target, onerror=_ignore_enoent)
----------------
Teemperor wrote:
Should we maybe unify this trick across the test suite? That is, we either have all paths in this UNC format or at least assert they are always absolute so we can easily convert them (IIUC, this breaks with relative paths or similar).
https://github.com/llvm/llvm-project/pull/209409
More information about the lldb-commits
mailing list