[llvm] [LIT][Cygwin] Skip pre-check for existence in mkdir-p (PR #163948)

Alexander Richardson via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 17 14:25:54 PDT 2025


================
@@ -164,14 +164,7 @@ def mkdir(path):
 def mkdir_p(path):
     """mkdir_p(path) - Make the "path" directory, if it does not exist; this
     will also make directories for any missing parent directories."""
-    if not path or os.path.exists(path):
-        return
-
-    parent = os.path.dirname(path)
-    if parent != path:
-        mkdir_p(parent)
-
-    mkdir(path)
+    os.makedirs(path, exist_ok=True)
----------------
arichardson wrote:

They do in the `def mkdir(path):` above.

It sounds like python3.6 supports long paths if they are enabled in the registry so there should be no need to work around it here anymore:
https://bugs.python.org/issue27731 -> https://hg.python.org/cpython/rev/26601191b368

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


More information about the llvm-commits mailing list