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

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 9 00:05:47 PDT 2019


sammccall added a subscriber: Bigcheese.
sammccall added a comment.

Tagging D62271 <https://reviews.llvm.org/D62271> and @Bigcheese as this was the change that switched the default in Driver. (My motivation for D58169 <https://reviews.llvm.org/D58169> was thread-heavy programs like clangd).

(At this point it seems likely that MAX_PATH and working directory issues are going to be our greatest defenses against the robot uprising)



================
Comment at: clang/include/clang/Driver/Options.td:2010
   HelpText<"Overlay the virtual filesystem described by file over the real file system">;
+def ivfsmode : Joined<["-"], "ivfsmode=">, Group<clang_i_Group>, Flags<[CC1Option, HelpHidden]>,
+  HelpText<"Use the virtual file system in 'real' mode, or 'physical' mode. In 'real' mode the working directory is linked to the process' working directory. In 'physical' mode it has its own working directory, independent of (but initially equal to) that of the process.">,
----------------
Referring to this as `vfs`/"use the virtual file system..." seems possibly misleading, as we're talking about how we're using the *real* filesystem (through the virtual interface)


================
Comment at: clang/include/clang/Driver/Options.td:2012
+  HelpText<"Use the virtual file system in 'real' mode, or 'physical' mode. In 'real' mode the working directory is linked to the process' working directory. In 'physical' mode it has its own working directory, independent of (but initially equal to) that of the process.">,
+  Values<"real,physical">;
 def imultilib : Separate<["-"], "imultilib">, Group<gfortran_Group>;
----------------
Mea culpa: naming these `physical`/`real` doesn't really explain either the implementation difference nor the observable effect.
(I thought this internal name didn't matter much and didn't want to rename `getRealFilesystem`...)

Can we avoid propagating these bad names further? Maybe instead something like `-os-workdir` or `-workdir=os|virtual` or similar?


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