With Split DWARF the resulting object file (then called skeleton CU)
contains the file name of another ("DWO") file with the debug info.
This can be a problem for remote compilation, as it will contain the
name of the file on the compilation server, not on the client.
To use Split DWARF with remote compilation, one needs to either
- make sure only relative paths are used, and mirror the build directory structure of the client on the server,
- inject the desired file name on the client directly.
Since llc already supports the latter solution, we're just copying that
over. We allow setting the actual output filename separately from the
value of the DW_AT_[GNU_]dwo_name attribute in the skeleton CU.
Fixes PR40276.
Comments are a bit inconsistent - "filename for the split debug info" versus "name for the split debug info file" - makes it perhaps a bit harder to see what the important difference is between these two values.
It might be helpful to clarify "used in the skeleton CU" as "Used as the dwo_name in the DWARF" versus "the name of the file to write the .dwo sections to" or something like that?