================
@@ -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)
----------------
charles-zablit wrote:

Agreed, I have made it more robust and reusable accross the test infrastructure.

We are not hitting the long path issue on llvm upstream, I will run the tests 
on swiftlang with this commit to see if it fixes the bug.

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