[clang] [clang] Absoultify paths in dependency file output (PR #117458)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 31 10:40:30 PST 2024


================
@@ -312,11 +315,22 @@ 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);
+  // Resolve absolute path. Make and Ninja canonicalize paths
----------------
MaskRay wrote:

TIL the Make behavior :)

@madscientist

https://github.com/llvm/llvm-project/pull/117458


More information about the cfe-commits mailing list