[PATCH] D57533: lit: support long paths on Windows

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 5 14:02:54 PST 2019


rnk added inline comments.


================
Comment at: utils/lit/lit/TestRunner.py:620
+
+                    class SHFILEOPSTRUCTW(Structure):
+                        _fields_ = [
----------------
compnerd wrote:
> thakis wrote:
> > rnk wrote:
> > > This seems like a lot of ctypes code that would be better off written as a little llvm-rm utility in native C++ code, with a substitution from `\brm\b` to `llvm-rm`. Then, we'll have finally integrated a "safe rm" into LLVM, and we'll have a place we can add retry loops to try to satisfy hostile virus scanners.... it'll be great. =P WDYT?
> > Or we could stop having rm be a builtin again. You need unxutils or similar to run tests on Win anyhow, and there are rm implementations for Windows that can do this. That seems a lot simpler.
> @thakis, having GNUWin32 seems insufficient, as that doesn't really support long paths :-( (or at least, I've run into issues with that too).  @rnk, I can't tell if you are serious.  I mean, its trivial to convert this to a C++ program, and I can do that, I just don't know if it is worth it.
@compnerd Well, not that serious. I kind of just wanted to throw out the suggestion. We can do this shell32 call. I just think we're going to end up doing more bug fixes on it later.
@thakis, that's kind of the issue, though, isn't it? The GNU tools distributions that LLVM itself recommends don't handle these long paths well, and for Chromium we had to bundle our own "safe rm". I forget where it came from to begin with, MSys? git bash msys? I'd be OK going back to native `rm` if we could point with confidence to some tools that actually work.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57533/new/

https://reviews.llvm.org/D57533





More information about the llvm-commits mailing list