<div dir="ltr"><div dir="ltr"><div dir="ltr">I think the ABI breaking part goes without saying, it's the reason we have unstable (currently sitting at version 2) ABI, it's already massively incompatible with ABI version 1 due to different layouts of things like std::basic_string (due to SBO changes). <div><br></div><div>As far as enabling it goes, currently to use version 2 of the ABI (which is still unstable), one has to explicitly specify that when building libc++, said libc++ is not going to be ABI compatible with anything earlier than it. Currently one can simulate that by enabling LIBCXX_ABI_UNSTABLE without bumping up the ABI version which basically toggles ABI v2 without changing the versioning prefix from __1 causing anything linked to it to break during early initialization.  </div><div><br></div><div>Regarding the heuristic, yes that was my suggestion since this can be handled in the Clang mangler, meaning we could simply check if it's __1 (the reserved "stable" inline namespace, which is currently in use, as such, short mangling would be disabled during IR CodeGen). Otherwise if the namespace is a reserved (as discussed previously regarding numeric versioning being reserved for libc++'s own use while) and is in the form of __N with N above 1, short mangling could be applied, for example with LIBCXX_ABI_VERSION=2 (Currently in use by Fuchsia, although they do not mind breaking changes so far, as explicitly stated during discussions of marking 2 as "stable").</div><div><br></div><div>Thank you.</div></div></div></div>