[PATCH] D65986: Allow setting the VFS to 'real' mode instead of default 'physical'

JF Bastien via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 9 09:50:27 PDT 2019


jfb marked 2 inline comments as done.
jfb added inline comments.


================
Comment at: clang/test/Driver/vfsmode.py:4
+
+# UNSUPPORTED: system-windows
+
----------------
labath wrote:
> jfb wrote:
> > I'm not sure what the best way to test this on Windows would be, and without a machine handy I can't really test this :-(
> Unsupported might be actually correct here. I am not an expert on windows, but I have a vague recollection that there, the platform's maximum path limit applies to the final absolute path of the file, irrespective of how you happen to refer to that file.
[This document](https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maximum-path-length-limitation) says:

> Because you cannot use the "`\\?\`" prefix with a relative path, relative paths are always limited to a total of `MAX_PATH` characters.

So it seems relative paths can contain up to `MAX_PATH`.

Though there are limitations that I don't honor in this test such as:

> When using an API to create a directory, the specified path cannot be so long that you cannot append an 8.3 file name (that is, the directory name cannot exceed `MAX_PATH` minus 12).

And then there's [`longPathAware`](https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#enable-long-paths-in-windows-10-version-1607-and-later) which removes restrictions if the machine and the application opt-in...

So I'm very happy to ignore this UNIX test on Windows.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65986





More information about the cfe-commits mailing list