[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
Thu Aug 8 21:37:07 PDT 2019
jfb added inline comments.
================
Comment at: clang/lib/Driver/Driver.cpp:172
+ case VFSMode::Unknown:
+ if (!this->VFS) {
+ LLVM_FALLTHROUGH;
----------------
JDevlieghere wrote:
> Is this really necessary?
the `Driver` ctor takes a `VFS` parameter which some tools set (otherwise it defaults to `nullptr`), so if the command-line `VFS` isn't specified we want to leave whatever was passed in as-is. If the command line parameter is set the we'll obey that instead.
So yes I think it's the right thing to do.
================
Comment at: clang/test/Driver/vfsmode.py:18
+current = os.path.realpath(os.curdir)
+name_max = int(subprocess.check_output("getconf NAME_MAX /", shell=True))
+path_max = int(subprocess.check_output("getconf PATH_MAX /", shell=True))
----------------
JDevlieghere wrote:
> Can we pass `current` here?
Nice catch, I think this is required for correctness (in case the CWD's filesystem is different from `/`'s and they have different configurations).
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