[libcxx-commits] [libcxx] [libc++] Refactor the Windows and MinGW implementation of the locale base API (PR #115752)

Martin Storsjö via libcxx-commits libcxx-commits at lists.llvm.org
Mon Nov 11 14:45:17 PST 2024


mstorsjo wrote:

> > But I would request that this isn't treated as blanket permission to break the whole ABI
> 
> Ack. I am putting up the "cleanest" version of this patch which removes the old symbols that are not needed anymore. However, if backwards compatibility is required, we could embed these historically significant symbols into the shared library. There's a number of ways we can do that. We could use aliases if that's a thing on Windows, or we could simply define the old name in a separate `.cpp` file similar to what we're doing in `libcxx/src/legacy_pointer_safety.cpp` (but with a real implementation). I wanted to have a discussion before I started making this patch more complicated for ABI guarantees I wasn't sure mattered.

Ok, thanks! Sure, going about it this way seems reasonable.

When grepping around a bit, I realized that we have the frozen C++03 headers which also reference a number of symbols - so we probably need to keep providing what those need as well.

> > are they implicitly embedded in many cases, or are they only referenced if the user code explicitly uses locale things
> 
> I do think that older binaries are going to have references to those symbols, so that means running the binary against a new version of the library would fail with undefined references.

Right... I guess we'd need to test and see how many of current msys2 binaries would be broken by the change as is (once it's in a otherwise working shape) to figure out how much we'd practically want to keep providing...



https://github.com/llvm/llvm-project/pull/115752


More information about the libcxx-commits mailing list