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
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
# 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
#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
# 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>
# 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>
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)
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
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
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")
DEPENDS ${lib_install_target}
cxx_experimental
${header_install_target}
- ${pstl_install_target}
COMMAND "${CMAKE_COMMAND}"
-DCMAKE_INSTALL_COMPONENT=cxx
-DCMAKE_INSTALL_DO_STRIP=1
+++ /dev/null
-../../../pstl/test/std
\ No newline at end of file
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
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.
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)
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)