[libcxx-commits] [PATCH] D125686: [libc++] Introduce LIBCXX_LIBRARY_VERSION
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon May 16 06:51:45 PDT 2022
ldionne created this revision.
Herald added a subscriber: mgorny.
Herald added a project: All.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
This allows controlling the current_version linker property on Apple
platforms.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D125686
Files:
libcxx/CMakeLists.txt
libcxx/src/CMakeLists.txt
Index: libcxx/src/CMakeLists.txt
===================================================================
--- libcxx/src/CMakeLists.txt
+++ libcxx/src/CMakeLists.txt
@@ -211,7 +211,7 @@
COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}"
LINK_FLAGS "${LIBCXX_LINK_FLAGS}"
OUTPUT_NAME "c++"
- VERSION "${LIBCXX_ABI_VERSION}.0"
+ VERSION "${LIBCXX_LIBRARY_VERSION}"
SOVERSION "${LIBCXX_ABI_VERSION}"
DEFINE_SYMBOL ""
)
Index: libcxx/CMakeLists.txt
===================================================================
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -177,7 +177,14 @@
else()
set(abi_version "1")
endif()
-set(LIBCXX_ABI_VERSION "${abi_version}" CACHE STRING "ABI version of libc++. Can be either 1 or 2, where 2 is currently the unstable ABI. Defaults to 1 unless LIBCXX_ABI_UNSTABLE is specified, in which case this is 2.")
+set(LIBCXX_ABI_VERSION "${abi_version}" CACHE STRING
+ "ABI version of libc++. Can be either 1 or 2, where 2 is currently the unstable ABI.
+ Defaults to 1 unless LIBCXX_ABI_UNSTABLE is specified, in which case this is 2.")
+set(LIBCXX_LIBRARY_VERSION "${LIBCXX_ABI_VERSION}.0" CACHE STRING
+ "Version of libc++. This will be reflected in the name of the shared library produced.
+ For example, -DLIBCXX_LIBRARY_VERSION=x.y will result in the library being named
+ libc++.x.y.dylib, along with the usual symlinks pointing to that. On Apple platforms,
+ this also controls the linker's 'current_version' property.")
set(LIBCXX_ABI_NAMESPACE "__${LIBCXX_ABI_VERSION}" CACHE STRING "The inline ABI namespace used by libc++. It defaults to __n where `n` is the current ABI version.")
if (NOT LIBCXX_ABI_NAMESPACE MATCHES "__.*")
message(FATAL_ERROR "LIBCXX_ABI_NAMESPACE must be a reserved identifier.")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125686.429702.patch
Type: text/x-patch
Size: 1817 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220516/2b7c4800/attachment-0001.bin>
More information about the libcxx-commits
mailing list