From fe13c13cc236aebe042b58f1e7fa9f6712e037b9 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Tue, 30 Oct 2018 21:44:53 +0000 Subject: Make libc++'s versioning namespace customizable Summary: This patch makes the versioning namespace libc++ uses customizable by the user using `-DLIBCXX_ABI_NAMESPACE=__foo`. This allows users to build custom versions of libc++ which can be linked into binaries with other libc++ versions without causing symbol conflicts or ODR issues. Reviewers: mclow.lists, ldionne Reviewed By: ldionne Subscribers: kristina, smeenai, mgorny, phosek, libcxx-commits Differential Revision: https://reviews.llvm.org/D53879 llvm-svn: 345657 --- libcxx/docs/BuildingLibcxx.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libcxx/docs') diff --git a/libcxx/docs/BuildingLibcxx.rst b/libcxx/docs/BuildingLibcxx.rst index daf9229a0d0..66cfb7b21ea 100644 --- a/libcxx/docs/BuildingLibcxx.rst +++ b/libcxx/docs/BuildingLibcxx.rst @@ -360,6 +360,18 @@ The following options allow building libc++ for a different ABI version. Build the "unstable" ABI version of libc++. Includes all ABI changing features on top of the current stable version. +.. option:: LIBCXX_ABI_NAMESPACE:STRING + + **Default**: ``__n`` where ``n`` is the current ABI version. + + This option defines the name of the inline ABI versioning namespace. It can be used for building + custom versions of libc++ with unique symbol names in order to prevent conflicts or ODR issues + with other libc++ versions. + + .. warning:: + When providing a custom namespace, it's the users responsibility to ensure the name won't cause + conflicts with other names defined by libc++, both now and in the future. + .. option:: LIBCXX_ABI_DEFINES:STRING **Default**: ``""`` -- cgit v1.2.3