diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt --- a/libcxx/CMakeLists.txt +++ b/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}) diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt --- a/libcxx/src/CMakeLists.txt +++ b/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) diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt --- a/libcxxabi/CMakeLists.txt +++ b/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) diff --git a/libcxxabi/src/CMakeLists.txt b/libcxxabi/src/CMakeLists.txt --- a/libcxxabi/src/CMakeLists.txt +++ b/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 diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt --- a/libunwind/CMakeLists.txt +++ b/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 diff --git a/libunwind/src/CMakeLists.txt b/libunwind/src/CMakeLists.txt --- a/libunwind/src/CMakeLists.txt +++ b/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")