thakis added a comment.

Do you know what cl.exe does to paths in pdb files? Does it write 
mixed-slashiness for foo/bar.h includes, or does it write backslashes 
throughout?

Windows can handle slashes, but several tools can't. I worry that if we do 
something different than cl, some random corner case might break (dbghelp, or 
some source server thing or some custom debug info processor somewhere).

> Then secondly - if the source paths are relative paths, making them 
> OS-agnostic in this way does make sense. But if they are absolute, they are 
> pretty much by definition specific to the build host,

We use `/pdbsourcepath:X:\fake\prefix` to write a deterministic absolute path 
to the output file at link time (and `-fdebug-compilation-dir .` to get 
deterministic compiler output – see 
https://blog.llvm.org/2019/11/deterministic-builds-with-clang-and-lld.html). 
The motivation is to get exactly the same output when building on linux and 
windows hosts.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122766

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

Reply via email to