Allows to have multiple instances of RealFileSystem that have
different working directories.
Details
Diff Detail
- Build Status
Buildable 8967 Build 8967: arc lint + arc unit
Event Timeline
Also tested by temporarily replacing getRealFileSystem() body with return createThreadFriendlyRealFS(); and running check-all, all tests passed.
To be more specific, there was one crash in clang-format, as there is a piece of code that uses raw pointer from getRealFileSystem instead of ref-counted (i.e. it calls getRealFileSystem().get()). After working around that, all tests passed.
Added a very rough prototype of vfs::RealFileSystem that uses openat and similar functions.
Not ready for submission yet, submitted here to start discussion about Windows implementation.
Requires changes in Support library to run correctly: https://reviews.llvm.org/D36265
abandoning in favor of the change landed by @sammccall that resolves uses absolute paths instead of at-family functions.