================
@@ -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
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to