[libcxx-dev] Clarification around ABI version
Petr Hosek via libcxx-dev
libcxx-dev at lists.llvm.org
Wed Oct 3 18:27:40 PDT 2018
Thanks Marshall and Eric, this clarifies the situation.
On Mon, Oct 1, 2018 at 9:23 PM Marshall Clow <mclow.lists at gmail.com> wrote:
> Since you link libc++ statically, and have no abi concerns, I would use
> This contains changes/improvements/bug fixes that we were unable to ship
> generally, because of ABI concerns.
I've tried this and I think it'd work for us but there is one issue, with
LIBCXX_ABI_UNSTABLE, libc++ build uses 1 as SOVERSION so we end up
with libc++.so.1.0 as the filename which is technically incorrect. However,
I don't know what would be the best solution here.
We could use a string instead, e.g. 'unstable' but that might break clients
who assume it's a number (even though in ELF it's an arbitrary string). We
could also choose a meaningless number, e.g. 0, so the filename would be
Alternatively, we could disable the use of SOVERSION and VERSION for
unstable ABI, SOVERSION is primarily needed using the library as part of
the system installation, but for unstable ABI that's unlikely to be the
case. So the name of the library would be just libc++.so. However, that
introduces another issue with the linkerscript which currently uses that
name and uses the actual library as the input. We could rename the library
to libc++_internal.so or we could make the Clang driver pass -lc++abi
explicitly and avoid the need for the linkerscript. The latter is fine for
Fuchsia since we don't currently support other C++ ABI libraries, but may
not work for other targets.
Do you have any opinions on this?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the libcxx-dev