Re: [PATCH dwarves 3/3] dwarf_loader: add option to merge more dwarf cu's into one pahole cu
From: Yonghong Song <hidden>
Date: 2021-03-26 23:20:08
From: Yonghong Song <hidden>
Date: 2021-03-26 23:20:08
On 3/26/21 4:12 PM, Alexei Starovoitov wrote:
On Fri, Mar 26, 2021 at 4:05 PM Yonghong Song [off-list ref] wrote:quoted
Now since you found gcc actually has flags in dwarf tag producer which will provides whether lto is used, I went on clang side found that the following flag is needed in clang in order to embed flags in the producer tag: -grecord-gcc-switches...quoted
In Linux: - add flag -grecord-gcc-switches if clang lto is enabled.I think that will help to make dwarf output a bit more uniform between gcc and clang. So it's a good thing on its own. Recording compilation flags in the debug info could be useful in other cases too. I would pass it for both lto and non-lto builds.
Good point. Will do this.