cachemeifyoucan wrote:

I am not planning to merge yet until debug info people approves the direction. 
Like you said, I considered `-fdebug-compilation-dir=` option but it is 
actually altering the behavior if I want to achieve empty compilation 
directory. The underlying implementation can be tweaked to achieve the same 
affect (like using `std::optional<std::string>` for compilation directory but 
it seems we need a new flag anyway).

The reason I want to touch this code:
* If you have a file system that doesn't have current working directory, you 
can actually achieve empty compilation directory, but that code path is not 
tested and has bugs when generating debug info (like it will strip the leading 
`/` in absolute path)
* I want to explore generating debug info point to a CASID (or you can think a 
URL) instead of a path on disk to achieve build-path-agnostic and teach 
debugging tools to load CAS/remote content. That will get in the way of current 
logic of path resolution because URLs look like relative path and debugger will 
try to prefix `/proc/cwd` to URL before resolve it.

https://github.com/llvm/llvm-project/pull/149897
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to