[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-12-16 Thread Haowei Wu via Phabricator via cfe-commits
haowei added a comment. In D137473#3993584 , @bnbarham wrote: > LGTM. If you could put up a PR after to fix the use of > `sys::fs::make_absolute` that would be appreciated 🙇. Thanks, I will start working on the fix. Repository: rG LLVM Github Monore

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-12-16 Thread Haowei Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa903ecb4a26d: [vfs] Allow root paths relative to the vfsoverlay YAML file (authored by haowei). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-12-13 Thread Ben Barham via Phabricator via cfe-commits
bnbarham accepted this revision. bnbarham added a comment. This revision is now accepted and ready to land. LGTM. If you could put up a PR after to fix the use of `sys::fs::make_absolute` that would be appreciated 🙇. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-12-13 Thread Haowei Wu via Phabricator via cfe-commits
haowei updated this revision to Diff 482660. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137473/new/ https://reviews.llvm.org/D137473 Files: clang/test/VFS/Inputs/root-relative-overlay.yaml clang/test/VFS/relative-path.c llvm/include/llvm/Su

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-12-13 Thread Haowei Wu via Phabricator via cfe-commits
haowei updated this revision to Diff 482658. haowei added a comment. Rebased the change to solve the merge conflicts on the bots. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137473/new/ https://reviews.llvm.org/D137473 Files: clang/test/VFS/In

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-12-13 Thread Haowei Wu via Phabricator via cfe-commits
haowei added a comment. I changed some comments and add more details. If there is no objection, can I get an approval on this change so I can land it? It will unblock our development on Windows cross compilation support. Comment at: llvm/lib/Support/VirtualFileSystem.cpp:1933-

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-12-13 Thread Haowei Wu via Phabricator via cfe-commits
haowei updated this revision to Diff 482644. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137473/new/ https://reviews.llvm.org/D137473 Files: clang/test/VFS/Inputs/root-relative-overlay.yaml clang/test/VFS/relative-path.c llvm/include/llvm/Su

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-18 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: llvm/lib/Support/VirtualFileSystem.cpp:1933-1935 path_style = sys::path::is_absolute(Name, sys::path::Style::posix) ? sys::path::Style::posix : sys::path::Style::windows_backsla

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-18 Thread Haowei Wu via Phabricator via cfe-commits
haowei added inline comments. Comment at: llvm/lib/Support/VirtualFileSystem.cpp:1922 + EC = FS->makeAbsolute(FullPath, Name); + Name = canonicalize(Name); +} else { bnbarham wrote: > Why the canonicalization? If the Name here somehow ha

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-18 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added subscribers: hans, compnerd, Bigcheese. rnk added inline comments. Comment at: llvm/unittests/Support/VirtualFileSystemTest.cpp:1878 + // with native path seperator, regardless of the actual path seperator + // used in YAMLFilePath field. +#ifndef _WIN32 -

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a subscriber: rnk. dexonsmith added inline comments. Comment at: llvm/unittests/Support/VirtualFileSystemTest.cpp:1878 + // with native path seperator, regardless of the actual path seperator + // used in YAMLFilePath field. +#ifndef _WIN32 bnb

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-18 Thread Ben Barham via Phabricator via cfe-commits
bnbarham added inline comments. Comment at: llvm/lib/Support/VirtualFileSystem.cpp:1922 + EC = FS->makeAbsolute(FullPath, Name); + Name = canonicalize(Name); +} else { Why the canonicalization? Comment at: llvm/lib/Sup

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-16 Thread Haowei Wu via Phabricator via cfe-commits
haowei updated this revision to Diff 475884. haowei marked 2 inline comments as done. haowei added a comment. Fixing Windows test failures. overlay-relative flag will always using native path separator, therefore, it needs a separate base FS and OverlayYAML file setup on Windows. This diff adds

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-15 Thread Haowei Wu via Phabricator via cfe-commits
haowei marked 2 inline comments as done. haowei added inline comments. Comment at: llvm/include/llvm/Support/VirtualFileSystem.h:1010 + std::error_code makeAbsolute(StringRef WorkingDir, + SmallVectorImpl &Path) const; bnbarham wr

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-15 Thread Haowei Wu via Phabricator via cfe-commits
haowei updated this revision to Diff 475591. haowei added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137473/new/ https://reviews.llvm.org/D137473 Files: clang/test/VFS/Inputs/root-relative-overlay.yaml cla

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-15 Thread Haowei Wu via Phabricator via cfe-commits
haowei updated this revision to Diff 475574. haowei added a comment. I have to revert back to use process cwd instead of base fs cwd. There are a few tests relied the behavior of using process cwd that I need to take a closer look. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-15 Thread Ben Barham via Phabricator via cfe-commits
bnbarham added inline comments. Comment at: llvm/include/llvm/Support/VirtualFileSystem.h:1010 + std::error_code makeAbsolute(StringRef WorkingDir, + SmallVectorImpl &Path) const; Should be private IMO Comment a

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-14 Thread Haowei Wu via Phabricator via cfe-commits
haowei updated this revision to Diff 475347. haowei added a comment. Unit test failures under Windows should be fixed now. Root->name will also use base FS's current directory instead of process current directory now. Please take a look. Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-09 Thread Haowei Wu via Phabricator via cfe-commits
haowei added inline comments. Comment at: clang/test/VFS/Inputs/root-relative-overlay.yaml:4 + 'case-sensitive': false, + 'overlay-relative': true, + 'root-relative': 'yaml-dir', haowei wrote: > haowei wrote: > > bnbarham wrote: > > > bnbarham wrote: > > > > I

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-09 Thread Haowei Wu via Phabricator via cfe-commits
haowei updated this revision to Diff 474391. haowei added a comment. Add additional unit test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137473/new/ https://reviews.llvm.org/D137473 Files: clang/test/VFS/Inputs/root-relative-overlay.yaml c

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-08 Thread Ben Barham via Phabricator via cfe-commits
bnbarham added inline comments. Comment at: llvm/include/llvm/Support/VirtualFileSystem.h:660 /// 'use-external-names': +/// 'root-relative': /// 'overlay-relative': haowei wrote: > bnbarham wrote: > > phosek wrote: > > > Could we make this just a bool

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-08 Thread Haowei Wu via Phabricator via cfe-commits
haowei added inline comments. Comment at: clang/test/VFS/Inputs/root-relative-overlay.yaml:4 + 'case-sensitive': false, + 'overlay-relative': true, + 'root-relative': 'yaml-dir', bnbarham wrote: > bnbarham wrote: > > I'd prefer a test without `overlay-relative

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-08 Thread Haowei Wu via Phabricator via cfe-commits
haowei updated this revision to Diff 474115. haowei marked 2 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137473/new/ https://reviews.llvm.org/D137473 Files: clang/test/VFS/Inputs/root-relative-overlay.yaml clang/test/V

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-08 Thread Ben Barham via Phabricator via cfe-commits
bnbarham added inline comments. Comment at: clang/test/VFS/Inputs/root-relative-overlay.yaml:4 + 'case-sensitive': false, + 'overlay-relative': true, + 'root-relative': 'yaml-dir', bnbarham wrote: > I'd prefer a test without `overlay-relative` set to make it c

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-08 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D137473#3915497 , @bnbarham wrote: > This seems reasonable to me in general. @dexonsmith in case you have any > thoughts. SGTM! (I haven't reviewed in detail but I figure @bnbarham is on it...) Repository: rG LLVM Gith

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-08 Thread Ben Barham via Phabricator via cfe-commits
bnbarham added a subscriber: dexonsmith. bnbarham added a comment. This seems reasonable to me in general. @dexonsmith in case you have any thoughts. Comment at: clang/test/VFS/Inputs/root-relative-overlay.yaml:4 + 'case-sensitive': false, + 'overlay-relative': true, + 'roo

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-08 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: llvm/include/llvm/Support/VirtualFileSystem.h:660 /// 'use-external-names': +/// 'root-relative': /// 'overlay-relative': Could we make this just a boolean akin to `overlay-relative` since there are only two o

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-07 Thread Haowei Wu via Phabricator via cfe-commits
haowei added reviewers: bnbarham, keith. haowei added a comment. Please take a look. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137473/new/ https://reviews.llvm.org/D137473 ___ cfe-commits mailing lis

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-04 Thread Haowei Wu via Phabricator via cfe-commits
haowei created this revision. haowei added reviewers: phosek, abrachet. Herald added a subscriber: hiraditya. Herald added a project: All. haowei requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. VFS overlay file allow using