Page MenuHomePhabricator

[ELF] For VS-style diagnostics, prefer using the full path.

Authored by ikudrin on Aug 7 2019, 7:51 AM.



The file path we print in the message header is then used by Visual Studio to fill Error List so that a user can click on an item and jump to the mentioned location. If we use only a name part for that, Visual Studio might be unable to find the file or, even worse, show a wrong one.

Diff Detail


Event Timeline

ikudrin created this revision.Aug 7 2019, 7:51 AM
Herald added a project: Restricted Project. · View Herald Transcript
ruiu added a comment.Aug 8 2019, 2:57 AM

Generally looking good, but do these tests pass on Windows on which a path separator is \? It seems like you hardcoded / as a path separator in the tests.

ikudrin added a comment.EditedAug 8 2019, 3:39 AM

We had that issue with D65810 (rL368153), Windows build bots complained about different path separators. That was fixed in rL368169. Thus, I made similar adjustments in this patch.

Well, I have checked the patch on Windows. All tests pass.

ruiu accepted this revision.Aug 9 2019, 12:25 AM


I confirmed that these tests are not affected by the actual path on a machine running the tests. I missed the part that you added .line directive in this patch. Thank you for doing this.

This revision is now accepted and ready to land.Aug 9 2019, 12:25 AM
This revision was automatically updated to reflect the committed changes.