<div dir="ltr"><div dir="ltr">On Sun, Nov 7, 2021 at 7:31 AM AdrianPrantl via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><blockquote type="cite"><div>Am 11/4/21 um 3:05 PM schrieb David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>>:</div><br><div><div dir="ltr"><div dir="ltr">On Thu, Nov 4, 2021 at 3:01 PM Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>On Darwin, we still have a sizeable number of test failures to go until we're there: <a href="https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-matrix/" target="_blank">https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-matrix/</a></div></blockquote><div><br>I'm not sure what/where/how to read that - could you give me some pointers?<br></div></div></div></div></blockquote><div><br></div><div>Click on any successful runs in the DWARF5 column and then on "Logs".</div><img id="m_-4913269030749047134gmail-m_5817482378243446371F669B35C-6A63-470F-B867-8EEA4BF6AF54" width="1029" height="436" src="cid:17d3ef8590d1abd55d21"><br><div><br></div><br><div><blockquote type="cite"><div dir="ltr"><div class="gmail_quote"><div><br>In any case, as I recall, Darwin had a different default for quite a while after we switched the default on other platforms to v4, so I guess we could do the same thing for v5.<br></div></div></div></blockquote><div><br></div><div>Yes. I think we need to make this decision on a per-platform basis. On some platforms it may be even more nuanced. For example, when we moved macOS from DWARF v2 -> DWARF v4, we only enabled DWARF v4 on target triples with a deployment target of *-apple-macosx10.11 and higher, since various tools in the OS need to be able to understand the format. I don't know if other platforms have similar restrictions.</div></div></div></blockquote><div><br></div><div>Agree that this is a per-platform decision.</div><div><br></div><div>For clang::driver::toolChains::Generic_GCC, we can define GetDefaultDwarfVersion() to 5 to match GCC 11's switch (<a href="https://gcc.gnu.org/gcc-11/changes.html" target="_blank">https://gcc.gnu.org/gcc-11/changes.html</a>).</div><div><br class="gmail-Apple-interchange-newline">> For targets that produce DWARF debugging information GCC now defaults to DWARF version 5 (with the exception of VxWorks and Darwin/Mac OS X which default to version 2 and AIX which defaults to version 4). This can produce up to 25% more compact debug information compared to earlier versions.<br></div><div><br></div><div>Generic_GCC has many (indirect) derived classes (FreeBSD/OpenBSD/Solaris) which override the base GetDefaultDwarfVersion().<br></div><div>The Generic_GCC change will affect Haiku/Hurd/Linux/NetBSD/PS4CPU/etc. I have CC'd these folks: if your platform is not ready for DWARF v5, you can override GetDefaultDwarfVersion() in your toolchain.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div>-- adrian</div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><br></div><div>-- adrian</div><div><div><br><blockquote type="cite"><div>Am 11/4/21 um 2:58 PM schrieb David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>>:</div><br><div><div dir="ltr">Should we change Clang's default to DWARFv5?<br><br>(I'm motivated by having fixed a bug because I only tested with v4 - I should've tested with v5, but got me thinking about maybe v5 is just a better default at this point)<br><br>Google's been using v5 as the default for the better part of a year at this point - not the most debugger usage, but we validated GDB and LLDB for v5 pretty well & haven't encountered major issues since the switch.</div></div></blockquote></div></div></div></blockquote></div></div></blockquote></div><div><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div><blockquote type="cite"><div><div dir="ltr"><br></div></div></blockquote></div></div></div></blockquote></div></div></div></div>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr">宋方睿</div></div></div>