From a3c83b7511a56a1bc79784078caab0ad7f8c7abb Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Fri, 19 Jul 2019 18:52:46 +0000 Subject: [PATCH] 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. llvm-svn: 366603 --- libcxx/CMakeLists.txt | 2 -- libcxx/include/CMakeLists.txt | 1 - libcxx/include/__config_site.in | 1 - libcxx/include/algorithm | 4 ---- libcxx/include/execution | 19 ------------------- libcxx/include/memory | 4 ---- libcxx/include/module.modulemap | 4 ---- libcxx/include/numeric | 4 ---- libcxx/src/CMakeLists.txt | 9 --------- libcxx/test/CMakeLists.txt | 1 - libcxx/test/libcxx/double_include.sh.cpp | 1 - libcxx/test/lit.site.cfg.in | 1 - libcxx/test/std/pstl | 1 - libcxx/utils/libcxx/test/config.py | 7 ------- libcxxabi/src/CMakeLists.txt | 11 ----------- llvm/projects/CMakeLists.txt | 2 +- pstl/test/std/lit.local.cfg | 2 -- 17 files changed, 1 insertion(+), 73 deletions(-) delete mode 100644 libcxx/include/execution delete mode 120000 libcxx/test/std/pstl delete mode 100644 pstl/test/std/lit.local.cfg diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index 78b2f372b564..1f32bb1512f1 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -80,7 +80,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) # Benchmark options ----------------------------------------------------------- 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_HAS_MUSL_LIBC _LIBCPP_HAS_MUSL_LIBC) 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) set(abi_defines) diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt index e12068a1a2a1..7cbf82caa81f 100644 --- a/libcxx/include/CMakeLists.txt +++ b/libcxx/include/CMakeLists.txt @@ -62,7 +62,6 @@ set(files deque errno.h exception - execution experimental/__config experimental/__memory experimental/algorithm diff --git a/libcxx/include/__config_site.in b/libcxx/include/__config_site.in index 2bd3d8cc46cc..ffbd372edf00 100644 --- a/libcxx/include/__config_site.in +++ b/libcxx/include/__config_site.in @@ -29,7 +29,6 @@ #cmakedefine _LIBCPP_NO_VCRUNTIME #cmakedefine01 _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT #cmakedefine _LIBCPP_ABI_NAMESPACE @_LIBCPP_ABI_NAMESPACE@ -#cmakedefine _LIBCPP_HAS_NO_PARALLEL_ALGORITHMS @_LIBCPP_ABI_DEFINES@ diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm index 9ff29d72db97..0d7862675588 100644 --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -5678,8 +5678,4 @@ _LIBCPP_END_NAMESPACE_STD _LIBCPP_POP_MACROS -#if !defined(_LIBCPP_HAS_NO_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17 -# include -#endif - #endif // _LIBCPP_ALGORITHM diff --git a/libcxx/include/execution b/libcxx/include/execution deleted file mode 100644 index c1346db46453..000000000000 --- a/libcxx/include/execution +++ /dev/null @@ -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 -#endif - -#endif // _LIBCPP_EXECUTION diff --git a/libcxx/include/memory b/libcxx/include/memory index 744b864aca8e..d9222b3ada7e 100644 --- a/libcxx/include/memory +++ b/libcxx/include/memory @@ -5590,8 +5590,4 @@ _LIBCPP_END_NAMESPACE_STD _LIBCPP_POP_MACROS -#if !defined(_LIBCPP_HAS_NO_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17 -# include -#endif - #endif // _LIBCPP_MEMORY diff --git a/libcxx/include/module.modulemap b/libcxx/include/module.modulemap index 31d39ddf7c8a..bbfe90ed57f5 100644 --- a/libcxx/include/module.modulemap +++ b/libcxx/include/module.modulemap @@ -275,10 +275,6 @@ module std [system] { header "exception" export * } - module execution { - header "execution" - export * - } module filesystem { header "filesystem" export * diff --git a/libcxx/include/numeric b/libcxx/include/numeric index a815e5c21170..2118704d57f3 100644 --- a/libcxx/include/numeric +++ b/libcxx/include/numeric @@ -586,8 +586,4 @@ _LIBCPP_END_NAMESPACE_STD _LIBCPP_POP_MACROS -#if !defined(_LIBCPP_HAS_NO_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17 -# include -#endif - #endif // _LIBCPP_NUMERIC diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt index e7d11066c071..31cd24333a5e 100644 --- a/libcxx/src/CMakeLists.txt +++ b/libcxx/src/CMakeLists.txt @@ -196,11 +196,6 @@ function(cxx_link_system_libraries target) endif() 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) if(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. _CRT_STDIO_ISO_WIDE_SPECIFIERS) endif() - - if (LIBCXX_ENABLE_PARALLEL_ALGORITHMS) - target_link_libraries(${name} PUBLIC pstl::ParallelSTL) - endif() endfunction() split_list(LIBCXX_COMPILE_FLAGS) diff --git a/libcxx/test/CMakeLists.txt b/libcxx/test/CMakeLists.txt index 8a2114faf3c4..408ab62664fe 100644 --- a/libcxx/test/CMakeLists.txt +++ b/libcxx/test/CMakeLists.txt @@ -40,7 +40,6 @@ pythonize_bool(LIBCXX_HAS_ATOMIC_LIB) pythonize_bool(LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB) pythonize_bool(LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY) pythonize_bool(LIBCXX_DEBUG_BUILD) -pythonize_bool(LIBCXX_ENABLE_PARALLEL_ALGORITHMS) # By default, for non-standalone builds, libcxx and libcxxabi share a library # directory. diff --git a/libcxx/test/libcxx/double_include.sh.cpp b/libcxx/test/libcxx/double_include.sh.cpp index 5a1ee32f93d7..2ee444af566f 100644 --- a/libcxx/test/libcxx/double_include.sh.cpp +++ b/libcxx/test/libcxx/double_include.sh.cpp @@ -63,7 +63,6 @@ #include #include #include -#include #include #include #include diff --git a/libcxx/test/lit.site.cfg.in b/libcxx/test/lit.site.cfg.in index b5b390dc4d6c..ed9a711056dc 100644 --- a/libcxx/test/lit.site.cfg.in +++ b/libcxx/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.libcxxabi_shared = @LIBCXXABI_ENABLE_SHARED@ 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. config.loaded_site_config = True diff --git a/libcxx/test/std/pstl b/libcxx/test/std/pstl deleted file mode 120000 index 27a2822d9566..000000000000 --- a/libcxx/test/std/pstl +++ /dev/null @@ -1 +0,0 @@ -../../../pstl/test/std \ No newline at end of file diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py index e694ea14793b..e263e9db7502 100644 --- a/libcxx/utils/libcxx/test/config.py +++ b/libcxx/utils/libcxx/test/config.py @@ -580,13 +580,6 @@ class Configuration(object): support_path = os.path.join(self.libcxx_src_root, 'test/support') 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 # template depth with older Clang versions. self.cxx.addFlagIfSupported('-ftemplate-depth=270') diff --git a/libcxxabi/src/CMakeLists.txt b/libcxxabi/src/CMakeLists.txt index 2eea6c7e46f5..45d4d0253613 100644 --- a/libcxxabi/src/CMakeLists.txt +++ b/libcxxabi/src/CMakeLists.txt @@ -147,11 +147,6 @@ if (LLVM_ENABLE_MODULES) string(REPLACE "-Wl,-z,defs" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}") endif() -find_package(ParallelSTL QUIET) -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() - if ("${CMAKE_OSX_ARCHITECTURES}" MATCHES "^(armv6|armv7|armv7s)$") set(LIBCXXABI_USE_SJLJ_EXCEPTIONS ON) else() @@ -165,9 +160,6 @@ if (LIBCXXABI_ENABLE_SHARED) llvm_setup_rpath(cxxabi_shared) endif() target_link_libraries(cxxabi_shared PRIVATE ${LIBCXXABI_SHARED_LIBRARIES} ${LIBCXXABI_LIBRARIES}) - if (TARGET pstl::ParallelSTL) - target_link_libraries(cxxabi_shared PUBLIC pstl::ParallelSTL) - endif() set_target_properties(cxxabi_shared PROPERTIES CXX_EXTENSIONS @@ -216,9 +208,6 @@ endif() if (LIBCXXABI_ENABLE_STATIC) add_library(cxxabi_static STATIC ${LIBCXXABI_SOURCES} ${LIBCXXABI_HEADERS}) target_link_libraries(cxxabi_static PRIVATE ${LIBCXXABI_STATIC_LIBRARIES} ${LIBCXXABI_LIBRARIES}) - if (TARGET pstl::ParallelSTL) - target_link_libraries(cxxabi_static PUBLIC pstl::ParallelSTL) - endif() set_target_properties(cxxabi_static PROPERTIES CXX_EXTENSIONS diff --git a/llvm/projects/CMakeLists.txt b/llvm/projects/CMakeLists.txt index 47ceb9ea2f33..c98a88247733 100644 --- a/llvm/projects/CMakeLists.txt +++ b/llvm/projects/CMakeLists.txt @@ -30,8 +30,8 @@ if(${LLVM_BUILD_RUNTIME}) # Add the projects in reverse order of their dependencies so that the # dependent projects can see the target names of their dependencies. add_llvm_external_project(libunwind) - add_llvm_external_project(pstl) add_llvm_external_project(libcxxabi) + add_llvm_external_project(pstl) add_llvm_external_project(libcxx) endif() if(NOT LLVM_BUILD_EXTERNAL_COMPILER_RT) diff --git a/pstl/test/std/lit.local.cfg b/pstl/test/std/lit.local.cfg deleted file mode 100644 index 6b1e2c657906..000000000000 --- a/pstl/test/std/lit.local.cfg +++ /dev/null @@ -1,2 +0,0 @@ -if 'parallel-algorithms' not in config.available_features: - config.unsupported = True