浏览代码

Revert "[libc++] Integrate the PSTL into libc++"

This reverts r366593, which caused unforeseen breakage on the build bots.
I'm reverting until the problems have been figured out and fixed.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366603 91177308-0d34-0410-b5e6-96231b3b80d8
Louis Dionne 6 年之前
父节点
当前提交
33f76384d0

+ 0 - 2
CMakeLists.txt

@@ -80,7 +80,6 @@ endif()
 option(LIBCXX_ENABLE_FILESYSTEM "Build filesystem as part of the main libc++ library"
 option(LIBCXX_ENABLE_FILESYSTEM "Build filesystem as part of the main libc++ library"
     ${ENABLE_FILESYSTEM_DEFAULT})
     ${ENABLE_FILESYSTEM_DEFAULT})
 option(LIBCXX_INCLUDE_TESTS "Build the libc++ tests." ${LLVM_INCLUDE_TESTS})
 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)
 
 
 # Benchmark options -----------------------------------------------------------
 # Benchmark options -----------------------------------------------------------
 option(LIBCXX_INCLUDE_BENCHMARKS "Build the libc++ benchmarks and their dependencies" ON)
 option(LIBCXX_INCLUDE_BENCHMARKS "Build the libc++ benchmarks and their dependencies" ON)
@@ -746,7 +745,6 @@ config_define_if(LIBCXX_HAS_WIN32_THREAD_API _LIBCPP_HAS_THREAD_API_WIN32)
 config_define_if(LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY _LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL)
 config_define_if(LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY _LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL)
 config_define_if(LIBCXX_HAS_MUSL_LIBC _LIBCPP_HAS_MUSL_LIBC)
 config_define_if(LIBCXX_HAS_MUSL_LIBC _LIBCPP_HAS_MUSL_LIBC)
 config_define_if(LIBCXX_NO_VCRUNTIME _LIBCPP_NO_VCRUNTIME)
 config_define_if(LIBCXX_NO_VCRUNTIME _LIBCPP_NO_VCRUNTIME)
-config_define_if_not(LIBCXX_ENABLE_PARALLEL_ALGORITHMS _LIBCPP_HAS_NO_PARALLEL_ALGORITHMS)
 
 
 if (LIBCXX_ABI_DEFINES)
 if (LIBCXX_ABI_DEFINES)
   set(abi_defines)
   set(abi_defines)

+ 0 - 1
include/CMakeLists.txt

@@ -62,7 +62,6 @@ set(files
   deque
   deque
   errno.h
   errno.h
   exception
   exception
-  execution
   experimental/__config
   experimental/__config
   experimental/__memory
   experimental/__memory
   experimental/algorithm
   experimental/algorithm

+ 0 - 1
include/__config_site.in

@@ -29,7 +29,6 @@
 #cmakedefine _LIBCPP_NO_VCRUNTIME
 #cmakedefine _LIBCPP_NO_VCRUNTIME
 #cmakedefine01 _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT
 #cmakedefine01 _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT
 #cmakedefine _LIBCPP_ABI_NAMESPACE @_LIBCPP_ABI_NAMESPACE@
 #cmakedefine _LIBCPP_ABI_NAMESPACE @_LIBCPP_ABI_NAMESPACE@
-#cmakedefine _LIBCPP_HAS_NO_PARALLEL_ALGORITHMS
 
 
 @_LIBCPP_ABI_DEFINES@
 @_LIBCPP_ABI_DEFINES@
 
 

+ 0 - 4
include/algorithm

@@ -5678,8 +5678,4 @@ _LIBCPP_END_NAMESPACE_STD
 
 
 _LIBCPP_POP_MACROS
 _LIBCPP_POP_MACROS
 
 
-#if !defined(_LIBCPP_HAS_NO_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17
-#   include <pstl/internal/glue_algorithm_impl.h>
-#endif
-
 #endif  // _LIBCPP_ALGORITHM
 #endif  // _LIBCPP_ALGORITHM

+ 0 - 19
include/execution

@@ -1,19 +0,0 @@
-// -*- C++ -*-
-//===------------------------- execution ---------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef _LIBCPP_EXECUTION
-#define _LIBCPP_EXECUTION
-
-#include <__config>
-
-#if !defined(_LIBCPP_HAS_NO_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17
-#   include <pstl/internal/glue_execution_defs.h>
-#endif
-
-#endif // _LIBCPP_EXECUTION

+ 0 - 4
include/memory

@@ -5590,8 +5590,4 @@ _LIBCPP_END_NAMESPACE_STD
 
 
 _LIBCPP_POP_MACROS
 _LIBCPP_POP_MACROS
 
 
-#if !defined(_LIBCPP_HAS_NO_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17
-#   include <pstl/internal/glue_memory_impl.h>
-#endif
-
 #endif  // _LIBCPP_MEMORY
 #endif  // _LIBCPP_MEMORY

+ 0 - 4
include/module.modulemap

@@ -275,10 +275,6 @@ module std [system] {
     header "exception"
     header "exception"
     export *
     export *
   }
   }
-  module execution {
-    header "execution"
-    export *
-  }
   module filesystem {
   module filesystem {
     header "filesystem"
     header "filesystem"
     export *
     export *

+ 0 - 4
include/numeric

@@ -586,8 +586,4 @@ _LIBCPP_END_NAMESPACE_STD
 
 
 _LIBCPP_POP_MACROS
 _LIBCPP_POP_MACROS
 
 
-#if !defined(_LIBCPP_HAS_NO_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17
-#   include <pstl/internal/glue_numeric_impl.h>
-#endif
-
 #endif  // _LIBCPP_NUMERIC
 #endif  // _LIBCPP_NUMERIC

+ 0 - 9
src/CMakeLists.txt

@@ -196,11 +196,6 @@ function(cxx_link_system_libraries target)
   endif()
   endif()
 endfunction()
 endfunction()
 
 
-find_package(ParallelSTL QUIET)
-if (LIBCXX_ENABLE_PARALLEL_ALGORITHMS AND NOT TARGET pstl::ParallelSTL)
-  message(FATAL_ERROR "Could not find ParallelSTL")
-endif()
-
 function(cxx_set_common_defines name)
 function(cxx_set_common_defines name)
   if(LIBCXX_CXX_ABI_HEADER_TARGET)
   if(LIBCXX_CXX_ABI_HEADER_TARGET)
     add_dependencies(${name} ${LIBCXX_CXX_ABI_HEADER_TARGET})
     add_dependencies(${name} ${LIBCXX_CXX_ABI_HEADER_TARGET})
@@ -227,10 +222,6 @@ function(cxx_set_common_defines name)
                                  # in printf, scanf.
                                  # in printf, scanf.
                                  _CRT_STDIO_ISO_WIDE_SPECIFIERS)
                                  _CRT_STDIO_ISO_WIDE_SPECIFIERS)
   endif()
   endif()
-
-  if (LIBCXX_ENABLE_PARALLEL_ALGORITHMS)
-    target_link_libraries(${name} PUBLIC pstl::ParallelSTL)
-  endif()
 endfunction()
 endfunction()
 
 
 split_list(LIBCXX_COMPILE_FLAGS)
 split_list(LIBCXX_COMPILE_FLAGS)

+ 0 - 1
test/CMakeLists.txt

@@ -40,7 +40,6 @@ pythonize_bool(LIBCXX_HAS_ATOMIC_LIB)
 pythonize_bool(LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB)
 pythonize_bool(LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB)
 pythonize_bool(LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY)
 pythonize_bool(LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY)
 pythonize_bool(LIBCXX_DEBUG_BUILD)
 pythonize_bool(LIBCXX_DEBUG_BUILD)
-pythonize_bool(LIBCXX_ENABLE_PARALLEL_ALGORITHMS)
 
 
 # By default, for non-standalone builds, libcxx and libcxxabi share a library
 # By default, for non-standalone builds, libcxx and libcxxabi share a library
 # directory.
 # directory.

+ 0 - 1
test/libcxx/double_include.sh.cpp

@@ -63,7 +63,6 @@
 #include <deque>
 #include <deque>
 #include <errno.h>
 #include <errno.h>
 #include <exception>
 #include <exception>
-#include <execution>
 #include <fenv.h>
 #include <fenv.h>
 #include <filesystem>
 #include <filesystem>
 #include <float.h>
 #include <float.h>

+ 0 - 1
test/lit.site.cfg.in

@@ -33,7 +33,6 @@ config.use_libatomic            = @LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB@
 config.debug_build              = @LIBCXX_DEBUG_BUILD@
 config.debug_build              = @LIBCXX_DEBUG_BUILD@
 config.libcxxabi_shared         = @LIBCXXABI_ENABLE_SHARED@
 config.libcxxabi_shared         = @LIBCXXABI_ENABLE_SHARED@
 config.cxx_ext_threads          = @LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY@
 config.cxx_ext_threads          = @LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY@
-config.pstl_root                = "@ParallelSTL_SOURCE_DIR@" if @LIBCXX_ENABLE_PARALLEL_ALGORITHMS@ else None
 
 
 # Let the main config do the real work.
 # Let the main config do the real work.
 config.loaded_site_config = True
 config.loaded_site_config = True

+ 0 - 1
test/std/pstl

@@ -1 +0,0 @@
-../../../pstl/test/std

+ 0 - 7
utils/libcxx/test/config.py

@@ -580,13 +580,6 @@ class Configuration(object):
         support_path = os.path.join(self.libcxx_src_root, 'test/support')
         support_path = os.path.join(self.libcxx_src_root, 'test/support')
         self.cxx.compile_flags += ['-I' + support_path]
         self.cxx.compile_flags += ['-I' + support_path]
 
 
-        # Add includes for the PSTL headers
-        pstl_root = self.get_lit_conf('pstl_root')
-        if pstl_root is not None:
-            self.cxx.compile_flags += ['-I' + os.path.join(pstl_root, 'include')]
-            self.cxx.compile_flags += ['-I' + os.path.join(pstl_root, 'test')]
-            self.config.available_features.add('parallel-algorithms')
-
         # FIXME(EricWF): variant_size.pass.cpp requires a slightly larger
         # FIXME(EricWF): variant_size.pass.cpp requires a slightly larger
         # template depth with older Clang versions.
         # template depth with older Clang versions.
         self.cxx.addFlagIfSupported('-ftemplate-depth=270')
         self.cxx.addFlagIfSupported('-ftemplate-depth=270')