[libcxx-commits] [PATCH] D103198: [libc++] Add a CI configuration where we test the PSTL integration

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 26 12:49:06 PDT 2021


ldionne created this revision.
Herald added a subscriber: arichardson.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

This makes sure that the PSTL integration doesn't regress. Eventually,
when we're ready to ship PSTL, this configuration will be enabled by
default in all builds and we can drop this additional CI configuration.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103198

Files:
  libcxx/include/functional
  libcxx/utils/ci/buildkite-pipeline.yml
  libcxx/utils/ci/run-buildbot


Index: libcxx/utils/ci/run-buildbot
===================================================================
--- libcxx/utils/ci/run-buildbot
+++ libcxx/utils/ci/run-buildbot
@@ -89,7 +89,7 @@
 function generate-cmake() {
     generate-cmake-base \
           -S "${MONOREPO_ROOT}/llvm" \
-          -DLLVM_ENABLE_PROJECTS="libcxx;libunwind;libcxxabi" \
+          -DLLVM_ENABLE_PROJECTS="libcxx;libunwind;libcxxabi;pstl" \
           -DLIBCXX_CXX_ABI=libcxxabi \
           "${@}"
 }
@@ -347,6 +347,14 @@
     generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-no-localization.cmake"
     check-cxx-cxxabi
 ;;
+with-pstl)
+    export CC=clang
+    export CXX=clang++
+    clean
+    generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx20.cmake" \
+                   -DLIBCXX_ENABLE_PARALLEL_ALGORITHMS=ON
+    check-cxx-cxxabi
+;;
 x86_64-apple-system)
     export CC=clang
     export CXX=clang++
Index: libcxx/utils/ci/buildkite-pipeline.yml
===================================================================
--- libcxx/utils/ci/buildkite-pipeline.yml
+++ libcxx/utils/ci/buildkite-pipeline.yml
@@ -286,6 +286,18 @@
         - exit_status: -1  # Agent was lost
           limit: 2
 
+  # TODO: When this is ready, this should become the default and we can remove this job.
+  - label: "With PSTL support"
+    command: "libcxx/utils/ci/run-buildbot with-pstl"
+    artifact_paths:
+      - "**/test-results.xml"
+    agents:
+      queue: "libcxx-builders"
+    retry:
+      automatic:
+        - exit_status: -1  # Agent was lost
+          limit: 2
+
   - label: "Benchmarks"
     command: "libcxx/utils/ci/run-buildbot benchmarks"
     artifact_paths:
Index: libcxx/include/functional
===================================================================
--- libcxx/include/functional
+++ libcxx/include/functional
@@ -3029,17 +3029,12 @@
     {return           _Op::__call(_VSTD::get<_Idxs>(_VSTD::move(__bound_))...,
                                   _VSTD::forward<_Args>(__args)...);}
 
-    template<class _Fn = typename tuple_element<0, tuple<_Bound...>>::type,
-             class = _EnableIf<is_copy_constructible_v<_Fn>>>
-    constexpr __perfect_forward_impl(__perfect_forward_impl const& __other)
-        : __bound_(__other.__bound_) {}
+    constexpr __perfect_forward_impl(__perfect_forward_impl const&) = default;
+    constexpr __perfect_forward_impl(__perfect_forward_impl &&) = default;
 
-    template<class _Fn = typename tuple_element<0, tuple<_Bound...>>::type,
-             class = _EnableIf<is_move_constructible_v<_Fn>>>
-    constexpr __perfect_forward_impl(__perfect_forward_impl && __other)
-        : __bound_(_VSTD::move(__other.__bound_)) {}
-
-    template<class... _BoundArgs>
+    template<class... _BoundArgs, class = _EnableIf<
+        is_constructible<tuple<_Bound...>, _BoundArgs&&...>::value
+    >>
     explicit constexpr __perfect_forward_impl(_BoundArgs&&... __bound) :
         __bound_(_VSTD::forward<_BoundArgs>(__bound)...) { }
 };


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103198.348057.patch
Type: text/x-patch
Size: 3012 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210526/69bac5b7/attachment.bin>


More information about the libcxx-commits mailing list