[clang] [clang] use absolute path for builtin headers during module compilation (PR #68023)
Ben Langmuir via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 2 14:07:51 PDT 2023
================
@@ -348,6 +348,10 @@ bool ModuleMap::resolveAsBuiltinHeader(
if (!File)
return false;
+ // Ensure the path to the module directory is absolute, otherwise
+ // builtin headers will fail to resolve when using relative resource
+ // directory paths without a -I.
+ llvm::sys::fs::make_absolute(Path);
----------------
benlangmuir wrote:
This should be using `FileManager::makeAbsolutePath` to ensure `-working-directory` is handled correctly, and so that it goes through VFS makeAbsolute instead of using the process working directory.
https://github.com/llvm/llvm-project/pull/68023
More information about the cfe-commits
mailing list