[libcxx-commits] [PATCH] D135669: [runtimes] Add the ability to customize the output name of libc++, libc++abi and libunwind
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 11 07:07:50 PDT 2022
ldionne created this revision.
Herald added projects: libunwind, All.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libunwind.
ldionne requested review of this revision.
Herald added projects: libc++, libc++abi.
Herald added a reviewer: libc++.
Herald added a reviewer: libc++abi.
We already had the ability to do that for libc++.dylib, so this only adds
consistency for all the runtime libraries. This should allow working around
difficulties on AIX as described in https://llvm.org/D134221.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D135669
Files:
libcxx/CMakeLists.txt
libcxx/src/CMakeLists.txt
libcxxabi/CMakeLists.txt
libcxxabi/src/CMakeLists.txt
libunwind/CMakeLists.txt
libunwind/src/CMakeLists.txt
Index: libunwind/src/CMakeLists.txt
===================================================================
--- libunwind/src/CMakeLists.txt
+++ libunwind/src/CMakeLists.txt
@@ -161,7 +161,7 @@
PROPERTIES
LINK_FLAGS "${LIBUNWIND_LINK_FLAGS}"
LINKER_LANGUAGE C
- OUTPUT_NAME "unwind"
+ OUTPUT_NAME "${LIBUNWIND_SHARED_OUTPUT_NAME}"
VERSION "1.0"
SOVERSION "1"
)
@@ -201,7 +201,7 @@
PROPERTIES
LINK_FLAGS "${LIBUNWIND_LINK_FLAGS}"
LINKER_LANGUAGE C
- OUTPUT_NAME "unwind"
+ OUTPUT_NAME "${LIBUNWIND_STATIC_OUTPUT_NAME}"
)
list(APPEND LIBUNWIND_BUILD_TARGETS "unwind_static")
Index: libunwind/CMakeLists.txt
===================================================================
--- libunwind/CMakeLists.txt
+++ libunwind/CMakeLists.txt
@@ -111,6 +111,9 @@
set(LIBUNWIND_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
"Path where built libunwind runtime libraries should be installed.")
+set(LIBUNWIND_SHARED_OUTPUT_NAME "unwind" CACHE STRING "Output name for the shared libunwind runtime library.")
+set(LIBUNWIND_STATIC_OUTPUT_NAME "unwind" CACHE STRING "Output name for the static libunwind runtime library.")
+
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
Index: libcxxabi/src/CMakeLists.txt
===================================================================
--- libcxxabi/src/CMakeLists.txt
+++ libcxxabi/src/CMakeLists.txt
@@ -187,7 +187,7 @@
set_target_properties(cxxabi_shared
PROPERTIES
LINK_FLAGS "${LIBCXXABI_LINK_FLAGS}"
- OUTPUT_NAME "c++abi"
+ OUTPUT_NAME "${LIBCXXABI_SHARED_OUTPUT_NAME}"
SOVERSION "1"
VERSION "${LIBCXXABI_LIBRARY_VERSION}"
)
@@ -285,7 +285,7 @@
set_target_properties(cxxabi_static
PROPERTIES
LINK_FLAGS "${LIBCXXABI_LINK_FLAGS}"
- OUTPUT_NAME "c++abi"
+ OUTPUT_NAME "${LIBCXXABI_STATIC_OUTPUT_NAME}"
)
target_link_libraries(cxxabi_static
PUBLIC cxxabi_static_objects
Index: libcxxabi/CMakeLists.txt
===================================================================
--- libcxxabi/CMakeLists.txt
+++ libcxxabi/CMakeLists.txt
@@ -79,6 +79,9 @@
option(LIBCXXABI_INSTALL_HEADERS "Install the libc++abi headers." ON)
option(LIBCXXABI_INSTALL_LIBRARY "Install the libc++abi library." ON)
+set(LIBCXXABI_SHARED_OUTPUT_NAME "c++abi" CACHE STRING "Output name for the shared libc++abi runtime library.")
+set(LIBCXXABI_STATIC_OUTPUT_NAME "c++abi" CACHE STRING "Output name for the static libc++abi runtime library.")
+
set(LIBCXXABI_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/c++/v1" CACHE PATH "Path to install the libc++abi headers at.")
if(LLVM_LIBRARY_OUTPUT_INTDIR)
Index: libcxx/src/CMakeLists.txt
===================================================================
--- libcxx/src/CMakeLists.txt
+++ libcxx/src/CMakeLists.txt
@@ -300,7 +300,7 @@
PROPERTIES
COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}"
LINK_FLAGS "${LIBCXX_LINK_FLAGS}"
- OUTPUT_NAME "c++"
+ OUTPUT_NAME "${LIBCXX_STATIC_OUTPUT_NAME}"
)
cxx_add_common_build_flags(cxx_static)
cxx_set_common_defines(cxx_static)
Index: libcxx/CMakeLists.txt
===================================================================
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -407,8 +407,8 @@
set(LIBCXX_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
"Path where built libc++ runtime libraries should be installed.")
-set(LIBCXX_SHARED_OUTPUT_NAME "c++" CACHE STRING
- "Output name for the shared libc++ runtime library.")
+set(LIBCXX_SHARED_OUTPUT_NAME "c++" CACHE STRING "Output name for the shared libc++ runtime library.")
+set(LIBCXX_STATIC_OUTPUT_NAME "c++" CACHE STRING "Output name for the static libc++ runtime library.")
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135669.466805.patch
Type: text/x-patch
Size: 4108 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221011/b69a14ce/attachment-0001.bin>
More information about the libcxx-commits
mailing list