This is an archive of the discontinued LLVM Phabricator instance.

[vfs] Use FS->WorkingDirectory when converting relative path to ABS
Needs ReviewPublic

Authored by haowei on Jan 4 2023, 3:41 PM.

Details

Summary

This is a follow up of change D137473

When parsing root directory from a VFS YAML file, llvm always uses process working directory (PWD) as the current working directory if "root-relative" option is not set to "overlay-dir". This behavior prevents clang's --working-directory flag from taking effect when processing a relative root directory. This patch changes the default PWD to FS->WorkingDirectory, which fixes the issue.

Diff Detail

Event Timeline

haowei created this revision.Jan 4 2023, 3:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 4 2023, 3:41 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
haowei requested review of this revision.Jan 4 2023, 3:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 4 2023, 3:41 PM