Page MenuHomePhabricator

[Driver] Fix -working-directory issues

Authored by Bigcheese on May 22 2019, 3:34 PM.



Currently the -working-directory option does not actually impact the working
directory for all of the clang driver, it only impacts how files are looked up
to make sure they exist. This means that that clang passes the wrong paths
to -fdebug-compilation-dir and -coverage-notes-file.

This patch fixes that by changing all the places in the driver where we convert
to absolute paths to use the VFS, and then calling setCurrentWorkingDirectory on
the VFS. This also changes the default VFS for Driver to use a virtualized
working directory, instead of changing the process's working directory.

Diff Detail

rC Clang

Event Timeline

Bigcheese created this revision.May 22 2019, 3:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 22 2019, 3:34 PM
arphaman accepted this revision.May 28 2019, 1:48 PM


This revision is now accepted and ready to land.May 28 2019, 1:48 PM
This revision was automatically updated to reflect the committed changes.