HomePhabricator

[Driver] Fix -working-directory issues

Authored by Bigcheese on May 28 2019, 3:21 PM.

Description

[Driver] Fix -working-directory issues

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.

Differential Revision: https://reviews.llvm.org/D62271

llvm-svn: 361885

Details

Committed
BigcheeseMay 28 2019, 3:21 PM
Differential Revision
D62271: [Driver] Fix -working-directory issues
Parents
rG551465859113: [WebAssembly] Support for atomic fences
Branches
Unknown
Tags
Unknown