<div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Oct 1, 2018 at 8:00 PM Petr Hosek via libcxx-dev <<a href="mailto:libcxx-dev@lists.llvm.org">libcxx-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br><br><br>---------- Forwarded message ----------<br>From: Petr Hosek <<a href="mailto:phosek@chromium.org" target="_blank">phosek@chromium.org</a>><br>To: <a href="mailto:libcxx-dev@lists.llvm.org" target="_blank">libcxx-dev@lists.llvm.org</a><br>Cc: <br>Bcc: <br>Date: Mon, 1 Oct 2018 20:00:09 -0700<br>Subject: Clarification around ABI version<br><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">This was raised in D52660. Today, libc++ recognizes at least 3 different ABI versions: v1, v2 (and above) and unstable, see <a href="https://github.com/llvm-mirror/libcxx/blob/master/include/__config#L66" target="_blank">https://github.com/llvm-mirror/libcxx/blob/master/include/__config#L66</a>.</div></div></div></div></blockquote><div><br></div><div>Not really.</div><div>There is V1.</div><div>There is V2 and unstable. Today, those are the same.</div><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 dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">There are several questions that were raised in that review that I'd like to get clarity on:<br></div><div><br></div><div>1. Is there a plan to eventually stabilize v2 and introduce v3 (and above) as the unstable version or is v2 going to be unstable forever?</div></div></div></div></blockquote><div><br></div><div>We (the libc++ team) have no plans to do so - because we never ship a libc++. </div><div>(We do have a mechanism to do so, but no plans)<br></div><div>The decision of what ABI to support is made by the people who ship libc++</div><div><br></div><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 dir="ltr"><div dir="ltr"><div dir="ltr"><div>2. What are the guarantees for v2? I understand that this ABI can still change, but I'm interested in testing and stability, shall we expect that v2 receives the same amount of coverage and that bugs specific to v2 will get resolved with the same priority as bugs specific to v1?<br></div><div><br></div><div>Since the ABI version is part of the generated __config header, it's a vendor rather than per-target option which means it affects all targets that use libc++ headers from the toolchain. </div></div></div></div></blockquote><div><br></div><div>Correct.</div><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 dir="ltr"><div dir="ltr"><div dir="ltr"><div>This is fine for us since we always link libc++ statically on host and we don't have any plans to guarantee a stable C++ ABI on the target. The improvements seem to be worth using v2 over v1, but I'd like to better understand what the plans and guarantees are before committing to it.</div></div></div></div></blockquote><div><br></div><div>This is not a choice that we (the libc++ maintainers) can make.</div><div>This is up to the people who build libc++.</div><div><br></div><div>Apple, for example, ships V1 on Mac OS X (i386 and x86_64), but offers a different ABI on ARM64.</div><div>(at the very least, they define `_LIBCPP_ABI_ALTERNATE_STRING_LAYOUT`)</div><div><br></div><div>I have no idea what Android does.</div><div><br></div><div>Since you link libc++ statically, and have no abi concerns, I would use `_LIBCPP_ABI_UNSTABLE`.</div><div>This contains changes/improvements/bug fixes that we were unable to ship generally, because of ABI concerns.</div><div><br></div><div>Hope this helps.</div><div><br></div><div>-- Marshall</div><div><br></div></div></div></div></div>