[libc++][PSTL] Remove current integration
authorNikolas Klauser <nikolasklauser@berlin.de>
Sun, 16 Apr 2023 20:31:25 +0000 (22:31 +0200)
committerNikolas Klauser <nikolasklauser@berlin.de>
Fri, 21 Apr 2023 03:31:07 +0000 (05:31 +0200)
We decided to go a different route. To make the switch easier, rip out the old integration first and build on a clean base.

Reviewed By: ldionne, #libc, #libc_abi

Spies: arichardson, libcxx-commits

Differential Revision: https://reviews.llvm.org/D148480

libcxx/CMakeLists.txt
libcxx/include/algorithm
libcxx/include/execution
libcxx/include/memory
libcxx/include/numeric
libcxx/src/CMakeLists.txt
libcxx/test/std/pstl [deleted symlink]
libcxx/utils/data/ignore_format.txt
libcxxabi/src/CMakeLists.txt

index cf572af..2b6f998 100644 (file)
@@ -68,7 +68,6 @@ endif()
 option(LIBCXX_ENABLE_FILESYSTEM "Build filesystem as part of the main libc++ library"
     ${ENABLE_FILESYSTEM_DEFAULT})
 option(LIBCXX_INCLUDE_TESTS "Build the libc++ tests." ${LLVM_INCLUDE_TESTS})
-option(LIBCXX_ENABLE_PARALLEL_ALGORITHMS "Enable the parallel algorithms library. This requires the PSTL to be available." OFF)
 option(LIBCXX_ENABLE_DEBUG_MODE
   "Whether to build libc++ with the debug mode enabled.
    By default, this is turned off. Turning it on results in a different ABI (additional
index 9970a63..7e251eb 100644 (file)
@@ -1917,10 +1917,6 @@ template <class BidirectionalIterator, class Compare>
 #  pragma GCC system_header
 #endif
 
-#if defined(_LIBCPP_HAS_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17
-#  include <__pstl_algorithm>
-#endif
-
 #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17
 #  include <chrono>
 #endif
index 0402970..b68cdfa 100644 (file)
 #include <__config>
 #include <version>
 
-#if defined(_LIBCPP_HAS_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17
-#   include <__pstl_execution>
-#endif
-
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
index 24344d8..3946884 100644 (file)
@@ -912,10 +912,6 @@ template<size_t N, class T>
 #  pragma GCC system_header
 #endif
 
-#if defined(_LIBCPP_HAS_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17
-#   include <__pstl_memory>
-#endif
-
 #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <atomic>
 #  include <concepts>
index 100dbe1..5d7f25c 100644 (file)
@@ -167,10 +167,6 @@ template<class T>
 #  pragma GCC system_header
 #endif
 
-#if defined(_LIBCPP_HAS_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17
-#   include <__pstl_numeric>
-#endif
-
 #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <concepts>
 #  include <functional>
index 14130a7..2ad3b64 100644 (file)
@@ -181,16 +181,6 @@ if (APPLE AND LLVM_USE_SANITIZER)
   endif()
 endif()
 
-if (LIBCXX_ENABLE_PARALLEL_ALGORITHMS AND NOT TARGET pstl::ParallelSTL)
-  message(FATAL_ERROR "Could not find ParallelSTL")
-endif()
-
-function(cxx_set_common_defines name)
-  if (LIBCXX_ENABLE_PARALLEL_ALGORITHMS)
-    target_link_libraries(${name} PUBLIC pstl::ParallelSTL)
-  endif()
-endfunction()
-
 split_list(LIBCXX_COMPILE_FLAGS)
 split_list(LIBCXX_LINK_FLAGS)
 
@@ -210,7 +200,6 @@ if (LIBCXX_ENABLE_SHARED)
       DEFINE_SYMBOL ""
   )
   cxx_add_common_build_flags(cxx_shared)
-  cxx_set_common_defines(cxx_shared)
 
   if(ZOS)
     add_custom_command(TARGET cxx_shared POST_BUILD
@@ -302,7 +291,6 @@ if (LIBCXX_ENABLE_STATIC)
       OUTPUT_NAME   "${LIBCXX_STATIC_OUTPUT_NAME}"
   )
   cxx_add_common_build_flags(cxx_static)
-  cxx_set_common_defines(cxx_static)
 
   if (LIBCXX_HERMETIC_STATIC_LIBRARY)
     # If the hermetic library doesn't define the operator new/delete functions
@@ -411,14 +399,10 @@ if (NOT CMAKE_CONFIGURATION_TYPES)
     if(LIBCXX_INSTALL_HEADERS)
       set(header_install_target install-cxx-headers)
     endif()
-    if (LIBCXX_ENABLE_PARALLEL_ALGORITHMS)
-      set(pstl_install_target install-pstl)
-    endif()
     add_custom_target(install-cxx
                       DEPENDS ${lib_install_target}
                               cxx_experimental
                               ${header_install_target}
-                              ${pstl_install_target}
                       COMMAND "${CMAKE_COMMAND}"
                       -DCMAKE_INSTALL_COMPONENT=cxx
                       -P "${LIBCXX_BINARY_DIR}/cmake_install.cmake")
@@ -426,7 +410,6 @@ if (NOT CMAKE_CONFIGURATION_TYPES)
                       DEPENDS ${lib_install_target}
                               cxx_experimental
                               ${header_install_target}
-                              ${pstl_install_target}
                       COMMAND "${CMAKE_COMMAND}"
                       -DCMAKE_INSTALL_COMPONENT=cxx
                       -DCMAKE_INSTALL_DO_STRIP=1
diff --git a/libcxx/test/std/pstl b/libcxx/test/std/pstl
deleted file mode 120000 (symlink)
index 27a2822..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../../pstl/test/std
\ No newline at end of file
index 719d0c8..a1c7869 100644 (file)
@@ -309,7 +309,6 @@ libcxx/include/__debug
 libcxx/include/__debug_utils/randomize_range.h
 libcxx/include/deque
 libcxx/include/errno.h
-libcxx/include/execution
 libcxx/include/expected
 libcxx/include/__expected/expected.h
 libcxx/include/experimental/__config
index 4c27a25..54002ba 100644 (file)
@@ -154,10 +154,6 @@ if (LLVM_ENABLE_MODULES)
   string(REPLACE "-Wl,-z,defs" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
 endif()
 
-if (NOT TARGET pstl::ParallelSTL)
-  message(STATUS "Could not find ParallelSTL, libc++abi will not attempt to use it but the build may fail if the libc++ in use needs it to be available.")
-endif()
-
 include(WarningFlags)
 
 # Build the shared library.
@@ -208,9 +204,6 @@ if (LIBCXXABI_ENABLE_SHARED)
   target_link_libraries(cxxabi_shared
     PUBLIC cxxabi_shared_objects
     PRIVATE ${LIBCXXABI_SHARED_LIBRARIES} ${LIBCXXABI_LIBRARIES})
-  if (TARGET pstl::ParallelSTL)
-    target_link_libraries(cxxabi_shared PUBLIC pstl::ParallelSTL)
-  endif()
 
   list(APPEND LIBCXXABI_BUILD_TARGETS "cxxabi_shared")
   if (LIBCXXABI_INSTALL_SHARED_LIBRARY)
@@ -294,9 +287,6 @@ if (LIBCXXABI_ENABLE_STATIC)
   target_link_libraries(cxxabi_static
     PUBLIC cxxabi_static_objects
     PRIVATE ${LIBCXXABI_STATIC_LIBRARIES} ${LIBCXXABI_LIBRARIES})
-  if (TARGET pstl::ParallelSTL)
-    target_link_libraries(cxxabi_static PUBLIC pstl::ParallelSTL)
-  endif()
 
   list(APPEND LIBCXXABI_BUILD_TARGETS "cxxabi_static")
   if (LIBCXXABI_INSTALL_STATIC_LIBRARY)