================ @@ -312,11 +314,18 @@ void DependencyFileGenerator::finishedMainFile(DiagnosticsEngine &Diags) { /// https://msdn.microsoft.com/en-us/library/dd9y37ha.aspx for NMake info, /// https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx /// for Windows file-naming info. -static void PrintFilename(raw_ostream &OS, StringRef Filename, +static void PrintFilename(raw_ostream &OS, llvm::vfs::FileSystem *FS, + StringRef Filename, DependencyOutputFormat OutputFormat) { // Convert filename to platform native path llvm::SmallString<256> NativePath; llvm::sys::path::native(Filename.str(), NativePath); + // Make path absolute. Make and Ninja canonicalize paths without checking for + // symbolic links in the path, for performance concerns. + // If there is something like `/bin/../lib64` -> `/usr/lib64` + // (where `/bin` links to `/usr/bin`), Make will see them as `/lib64`. + if (FS != nullptr && llvm::sys::path::is_absolute(NativePath)) + FS->makeAbsolute(NativePath); ---------------- MaskRay wrote:
You can make the function `functionName` instead of `FunctionName` while updating its signature. https://github.com/llvm/llvm-project/pull/117458 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits