[libcxx-commits] [libcxx] [libcxx] Support ABI symbol sizes on macOS (PR #75623)
Will Hawkins via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jan 30 10:26:52 PST 2024
================
@@ -195,6 +195,26 @@ split_list(LIBCXX_LINK_FLAGS)
# Build the shared library.
if (LIBCXX_ENABLE_SHARED)
+
+ if (APPLE)
+ # If we are on an Apple platform, let's ask the linker to generate a map
+ # that we can use to determine the size of the abi symbols (see generate-cxx-abilist target).
+ if (CMAKE_CXX_COMPILER_TARGET)
+ set(triple "${CMAKE_CXX_COMPILER_TARGET}")
+ else()
+ set(triple "${LLVM_DEFAULT_TARGET_TRIPLE}")
+ endif()
+ cxx_abi_identifier(abi_identifier
+ "${triple}"
+ "${LIBCXX_CXX_ABI}"
+ "${LIBCXX_ABI_VERSION}"
+ "${LIBCXX_ABI_UNSTABLE}"
+ "${LIBCXX_ENABLE_EXCEPTIONS}"
+ "${LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS}"
+ )
+ add_link_flags("-Wl,-map,${CMAKE_CURRENT_BINARY_DIR}/../lib/abi/linker.map")
----------------
hawkinsw wrote:
Great. Will do!
https://github.com/llvm/llvm-project/pull/75623
More information about the libcxx-commits
mailing list