diff --git a/libcxx/cmake/Modules/HandleExceptionLibrary.cmake b/libcxx/cmake/Modules/HandleExceptionLibrary.cmake deleted file mode 100644 --- a/libcxx/cmake/Modules/HandleExceptionLibrary.cmake +++ /dev/null @@ -1,39 +0,0 @@ -#=============================================================================== -# Define targets for linking against the selected ABI library -# -# After including this file, the following targets are defined: -# - cxx_exception: A target representing the shared c++_exception library. -# constituting the split from c++ shared library. -# The LIBCXX_EXCEPTION_ZOS_BUILD, which can be defined in -# cache, determines if the library will be built or not. -#=============================================================================== - - -if (LIBCXX_EXCEPTION_ZOS_BUILD) - add_library(cxx_exception SHARED ${exclude_from_all} ${LIBCXX_EXCEPTIONS_SOURCE} ${LIBCXX_HEADERS}) - target_link_libraries(cxx_exception PUBLIC cxx-headers - PRIVATE ${LIBCXX_LIBRARIES}) - set_target_properties(cxx_exception - PROPERTIES - COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}" - LINK_FLAGS "${LIBCXX_LINK_FLAGS}" - OUTPUT_NAME "c++_exception" - VERSION "${LIBCXX_ABI_VERSION}" - SOVERSION "${LIBCXX_ABI_VERSION}" - DEFINE_SYMBOL "" - POSITION_INDEPENDENT_CODE ON - ) - cxx_add_common_build_flags(cxx_exception) - cxx_set_common_defines(cxx_exception) - - add_custom_command(TARGET cxx_exception POST_BUILD - COMMAND - ${LIBCXX_SOURCE_DIR}/utils/zos_rename_dll_side_deck.sh - $ $ "${LIBCXX_EXCEPTION_DLL_NAME}" - COMMENT "Rename dll name inside the side deck file" - WORKING_DIRECTORY $ - ) - - target_link_libraries(cxx_exception PUBLIC libcxx-abi-shared) - list(APPEND LIBCXX_BUILD_TARGETS "cxx_exception") -endif() diff --git a/libcxx/cmake/caches/s390x-ibm-zos-ascii.cmake b/libcxx/cmake/caches/s390x-ibm-zos-ascii.cmake --- a/libcxx/cmake/caches/s390x-ibm-zos-ascii.cmake +++ b/libcxx/cmake/caches/s390x-ibm-zos-ascii.cmake @@ -16,8 +16,6 @@ set(LIBCXX_DLL_NAME CRTEQCXS CACHE STRING "") set(LIBCXX_SHARED_OUTPUT_NAME "c++_a" CACHE STRING "Output name for the shared libc++ runtime library.") -set(LIBCXX_EXCEPTION_ZOS_BUILD OFF CACHE BOOL - "Build libcxx exception library on z/OS as standalone.") set(LIBCXX_CXX_ABI system-libcxxabi CACHE STRING "") set(LIBCXX_ADDITIONAL_COMPILE_FLAGS "-fzos-le-char-mode=ascii" CACHE STRING "") diff --git a/libcxx/cmake/caches/s390x-ibm-zos.cmake b/libcxx/cmake/caches/s390x-ibm-zos.cmake --- a/libcxx/cmake/caches/s390x-ibm-zos.cmake +++ b/libcxx/cmake/caches/s390x-ibm-zos.cmake @@ -12,9 +12,6 @@ # Target Specific set(LIBCXX_DLL_NAME CRTEQCXE CACHE STRING "") -set(LIBCXX_EXCEPTION_DLL_NAME CRTEQCXP CACHE STRING "") -set(LIBCXX_EXCEPTION_ZOS_BUILD ON CACHE BOOL - "Build libcxx exception library on z/OS as standalone.") set(LIBCXXABI_DLL_NAME CRTEQCXA CACHE STRING "") set(LIBCXXABI_ADDITIONAL_LIBRARIES "-Wl,lib/libunwind.x" CACHE STRING "") diff --git a/libcxx/cmake/caches/s390x32-ibm-zos-ascii.cmake b/libcxx/cmake/caches/s390x32-ibm-zos-ascii.cmake --- a/libcxx/cmake/caches/s390x32-ibm-zos-ascii.cmake +++ b/libcxx/cmake/caches/s390x32-ibm-zos-ascii.cmake @@ -16,8 +16,6 @@ set(LIBCXX_DLL_NAME CRTEHCXS CACHE STRING "") set(LIBCXX_SHARED_OUTPUT_NAME "c++_a" CACHE STRING "Output name for the shared libc++ runtime library.") -set(LIBCXX_EXCEPTION_ZOS_BUILD OFF CACHE BOOL - "Build libcxx exception library on z/OS as standalone.") set(LIBCXX_CXX_ABI system-libcxxabi CACHE STRING "") set(LIBCXX_ADDITIONAL_COMPILE_FLAGS "-fzos-le-char-mode=ascii" CACHE STRING "") diff --git a/libcxx/cmake/caches/s390x32-ibm-zos.cmake b/libcxx/cmake/caches/s390x32-ibm-zos.cmake --- a/libcxx/cmake/caches/s390x32-ibm-zos.cmake +++ b/libcxx/cmake/caches/s390x32-ibm-zos.cmake @@ -12,9 +12,6 @@ # Target Specific set(LIBCXX_DLL_NAME CRTEHCXE CACHE STRING "") -set(LIBCXX_EXCEPTION_DLL_NAME CRTEHCXP CACHE STRING "") -set(LIBCXX_EXCEPTION_ZOS_BUILD ON CACHE BOOL - "Build libcxx exception library on z/OS as standalone.") set(LIBCXXABI_DLL_NAME CRTEHCXA CACHE STRING "") diff --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h --- a/libcxx/include/__memory/shared_ptr.h +++ b/libcxx/include/__memory/shared_ptr.h @@ -47,11 +47,7 @@ # pragma GCC system_header #endif -#if defined(__MVS__) namespace std { -#else -_LIBCPP_BEGIN_NAMESPACE_STD -#endif class _LIBCPP_EXCEPTION_ABI bad_weak_ptr : public std::exception { public: bad_weak_ptr() _NOEXCEPT = default; @@ -60,11 +56,7 @@ const char* what() const _NOEXCEPT override; }; -#if defined(__MVS__) } -#else -_LIBCPP_END_NAMESPACE_STD -#endif _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt --- a/libcxx/src/CMakeLists.txt +++ b/libcxx/src/CMakeLists.txt @@ -132,14 +132,6 @@ endif() endif() -set(LIBCXX_EXCEPTIONS_SOURCE - exceptions.cpp - ) - -if (NOT ZOS) - list(APPEND LIBCXX_SOURCES ${LIBCXX_EXCEPTIONS_SOURCE}) -endif() - # Add all the headers to the project for IDEs. if (LIBCXX_CONFIGURE_IDE) file(GLOB_RECURSE LIBCXX_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../include/*) @@ -294,8 +286,6 @@ endif() endif() -include(HandleExceptionLibrary) - set(CMAKE_STATIC_LIBRARY_PREFIX "lib") # Build the static library. diff --git a/libcxxabi/src/CMakeLists.txt b/libcxxabi/src/CMakeLists.txt --- a/libcxxabi/src/CMakeLists.txt +++ b/libcxxabi/src/CMakeLists.txt @@ -10,6 +10,7 @@ cxa_vector.cpp cxa_virtual.cpp # C++ STL files + exceptions.cpp stdlib_exception.cpp stdlib_stdexcept.cpp stdlib_typeinfo.cpp diff --git a/libcxx/src/exceptions.cpp b/libcxxabi/src/exceptions.cpp rename from libcxx/src/exceptions.cpp rename to libcxxabi/src/exceptions.cpp --- a/libcxx/src/exceptions.cpp +++ b/libcxxabi/src/exceptions.cpp @@ -12,21 +12,10 @@ #include #include -#if defined(__MVS__) namespace std { -#else -_LIBCPP_BEGIN_NAMESPACE_STD -#endif bad_weak_ptr::~bad_weak_ptr() noexcept {} - const char* bad_weak_ptr::what() const noexcept { return "bad_weak_ptr"; } -#if defined(__MVS__) -} -#else -_LIBCPP_END_NAMESPACE_STD -#endif -namespace std { const char* bad_any_cast::what() const noexcept { return "bad any cast"; } bad_optional_access::~bad_optional_access() noexcept = default;