aganea added a comment.

It totally makes sense, thanks for the explanation Nico! Let's forget about 
`cl` compatibility, that wasn't my initial intent.

We always pass //relative// paths on the cmd-line, for all the reasons you've 
mentioned. We also pass `-fdiagnostics-absolute-paths` hoping to fix the Visual 
Studio jump-to-location issue I've mentioned above. However that doesn't work, 
because we do:

  (locally, on my PC)
    $ clang-cl file.cpp -Isome/relative/path/ -fdiagnostics-absolute-paths 
/showIncludes -E >file_pre.cpp
  
  (and then, on a remote PC)
    $ clang-cl file_pre.cpp -fdiagnostics-absolute-paths
  (the remote stdout is then displayed on my PC)

`-fdiagnostics-absolute-paths` has no effect in the latter case, because the 
paths are extracted from the preprocessed file, and paths can't be absolutized 
anymore on the remote PC because it doesn't have the source code (it is only a 
worker server).
So we end with relative paths in diagnostics, and Visual Studio can't jump to 
the location of the diagnostic.

What would you suggest? Use absolute paths along with `-fdebug-prefix-map`?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63648/new/

https://reviews.llvm.org/D63648



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to