[libcxx-commits] [libcxxabi] 7d98590 - [libc++][PSTL] Remove current integration

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 20 20:31:14 PDT 2023


Author: Nikolas Klauser
Date: 2023-04-21T05:31:07+02:00
New Revision: 7d98590b3a23645584779a1036d319082f3be7c9

URL: https://github.com/llvm/llvm-project/commit/7d98590b3a23645584779a1036d319082f3be7c9
DIFF: https://github.com/llvm/llvm-project/commit/7d98590b3a23645584779a1036d319082f3be7c9.diff

LOG: [libc++][PSTL] Remove current integration

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

Added: 
    

Modified: 
    libcxx/CMakeLists.txt
    libcxx/include/algorithm
    libcxx/include/execution
    libcxx/include/memory
    libcxx/include/numeric
    libcxx/src/CMakeLists.txt
    libcxx/utils/data/ignore_format.txt
    libcxxabi/src/CMakeLists.txt

Removed: 
    libcxx/test/std/pstl


################################################################################
diff  --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index cf572af74bd13..2b6f9987c6750 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -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 
diff erent ABI (additional

diff  --git a/libcxx/include/algorithm b/libcxx/include/algorithm
index 9970a63706b21..7e251ebd833d9 100644
--- a/libcxx/include/algorithm
+++ b/libcxx/include/algorithm
@@ -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

diff  --git a/libcxx/include/execution b/libcxx/include/execution
index 040297038637f..b68cdfac2c6d3 100644
--- a/libcxx/include/execution
+++ b/libcxx/include/execution
@@ -14,10 +14,6 @@
 #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

diff  --git a/libcxx/include/memory b/libcxx/include/memory
index 24344d8ab4f0e..39468847961e9 100644
--- a/libcxx/include/memory
+++ b/libcxx/include/memory
@@ -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>

diff  --git a/libcxx/include/numeric b/libcxx/include/numeric
index 100dbe1c32328..5d7f25c2e58ee 100644
--- a/libcxx/include/numeric
+++ b/libcxx/include/numeric
@@ -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>

diff  --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
index 14130a7527b47..2ad3b644a9809 100644
--- a/libcxx/src/CMakeLists.txt
+++ b/libcxx/src/CMakeLists.txt
@@ -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
index 27a2822d95669..0000000000000
--- a/libcxx/test/std/pstl
+++ /dev/null
@@ -1 +0,0 @@
-../../../pstl/test/std
\ No newline at end of file

diff  --git a/libcxx/utils/data/ignore_format.txt b/libcxx/utils/data/ignore_format.txt
index 719d0c8307080..a1c7869a797b0 100644
--- a/libcxx/utils/data/ignore_format.txt
+++ b/libcxx/utils/data/ignore_format.txt
@@ -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

diff  --git a/libcxxabi/src/CMakeLists.txt b/libcxxabi/src/CMakeLists.txt
index 4c27a25fc4755..54002bafa0e2d 100644
--- a/libcxxabi/src/CMakeLists.txt
+++ b/libcxxabi/src/CMakeLists.txt
@@ -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)


        


More information about the libcxx-commits mailing list