[llvm] [MC][DWARF] Use target (non-native) path separators when building DWARF directory-tables (PR #115888)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 12 14:12:28 PST 2024


dwblaikie wrote:

> > Maybe the title should be (& I haven't looked at the description/change in detail, so hopefully this suggested title also aligns with the implementation) "use the target path separator rather than the host path separator in DWARF output"?
> 
> That's not the full effect. For PS targets it's getting forced to Windows style, based on the target triple.
> 
> Really this needs to cater to how a cross-platform toolchain gets used. I would expect the host to be the usual environment for the debugger UI. Sony has the unusual use-case here, where a build can happen on Linux but the debugger runs on Windows (and expects Windows pathnames).
> 
> I think it would be better to have the decision NOT be based on the triple, but have the backend allow the driver to control the style (without perturbing today's defaults) and then the PS driver can do the needful.

Hrm :/ that seems a bit problematic... (since at compile time we can't know which OS you'll be remote debugging from) - would it be reasonable to always use path separators that match the target, and have consumers do remapping as needed?

https://github.com/llvm/llvm-project/pull/115888


More information about the llvm-commits mailing list