[PATCH] D45473: CodeGen: Don't try to canonicalize Unix-style paths in CodeView debug info.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 11 09:53:00 PDT 2018


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

OK, here are the two competing use cases that I am imagining:

1. (yours) Full cross-compilation from Unix, with linker diagnostics referring to files that exist locally on Unix.
2. Distributed cross-compilation on Unix, local linking on Windows with the VC linker.

I think the correct solution to 2 is going to be to use `-fdebug-compilation-dir` and `-fdebug-prefix-map=/unix/path=C:/windows/path` so that these DIFile directory components start with a drive letter that makes sense on the system doing the link.

Basically, if we have a DIFile directory that starts with `/`, let's trust that the producer wants Unix paths in their CodeView.


https://reviews.llvm.org/D45473





More information about the llvm-commits mailing list