[libcxx-dev] should the unstable ABI support building a shared library?

Richard Smith via libcxx-dev libcxx-dev at lists.llvm.org
Fri Jun 21 15:42:04 PDT 2019


By default, libc++ builds produce a shared library and a static library.
When LIBCXX_ABI_UNSTABLE is enabled, though, that seems like a mistake:
there is no stable interface, so dynamically linking against an
unstable-ABI libc++ shared library will be problematic.

In addition, if LIBCXX_ABI_VERSION is not specified during configuration,
the default behavior of the build system with LIBCXX_ABI_UNSTABLE enabled
is to produce a libc++.so.1.0 with the unstable ABI, which causes problems
if it's found on the library search path for a binary built against the
normal-ABI libc++.so.1.0. (And in a stock monorepo build, this means that
enabling LIBCXX_ABI_UNSTABLE and then building, say, llvm and libc++, with
a host compiler that uses libc++ as the standard library, results in broken
LLVM binaries in the build area: they were compiled against the stable
libc++ ABI but will pick up an unstable-ABI version of libc++ at runtime.)

Perhaps we should refuse to build a shared library version of libc++ with
the unstable ABI enabled?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libcxx-dev/attachments/20190621/f560550e/attachment.html>


More information about the libcxx-dev mailing list