[libcxx-commits] [libcxx] [libc++] Introduce ABI sensitive areas to avoid requiring _LIBCPP_HIDE_FROM_ABI everywhere (PR #131156)
Aaron Ballman via libcxx-commits
libcxx-commits at lists.llvm.org
Thu May 22 06:07:21 PDT 2025
AaronBallman wrote:
> > > > > I agree that this template specialization is something users would be doing; although it's not clear to me what you're implying about what we should do now.
> > > >
> > > >
> > > > Given that this is causing disruption, I think we should probably revert while investigating. WDYT @compnerd @philnik777 ?
> > >
> > >
> > > I'd rather not revert unless there is actually significant disruption.
> >
> >
> > We're rejecting correct code now, right? That's a conformance issue for which we'd generally revert.
> > > FWIW we can work around the problem for specific classes in the library, which would be annoying, but definitely better than reverting. The main question I'd like answered before doing anything is whether we consider this a problem worth solving. If the answer is yes, we'll work around the problem in the library until all compilers we support have been fixed.
> >
> >
> > If I'm correct about this rejecting valid code, then I think the answer is "yes, unless LWG says this is a defect".
>
> We're not. This is outside the realm of the standard, since it only concerns the visibility of a specialized `std::hash` (and possibly a few other classes). This is purely about whether we consider it a bug that adding `[[gnu::visibility("hidden")]]` on the `std` namespace inside headers bleeds to user specializations. (Also note that `[[gnu::visibility("default")]]` doesn't bleed to user specializations)
Ah good point, this is visibility related which the committee doesn't need to care about, so revert pressure is a bit lessened. But if we do something in the compiler about how visibility is inherited from the namespace, it should probably not be specific to `std`.
CC @ldionne on the revert question, I leave it in his capable hands as to whether that's something to do or not.
https://github.com/llvm/llvm-project/pull/131156
More information about the libcxx-commits
mailing list