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

Haowei Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 4 17:12:20 PDT 2022


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 relative paths in root->name paths (root directory of the virtual file) and external-contents (the actual files). While the 'external-contents' could be configured to relative to directory of the YAML file (change https://reviews.llvm.org/D17457), before this change, the root paths could only be relative to the current working directory.

This patch add the "root-relative" to the YAML file format. When this option is set to "yaml-dir" the root->name will be prepend by the YAML file directory. This option is helpful when compiling on case sensitive file systems when cross compiling to Windows as we can create a vfsoverlay YAML file for the Windows libraries without using absolute paths. Related change: https://reviews.llvm.org/D125800


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D137473

Files:
  clang/test/VFS/Inputs/root-relative-overlay.yaml
  clang/test/VFS/relative-path.c
  llvm/include/llvm/Support/VirtualFileSystem.h
  llvm/lib/Support/VirtualFileSystem.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137473.473377.patch
Type: text/x-patch
Size: 8403 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221105/a5b4274a/attachment.bin>


More information about the llvm-commits mailing list