How to build libc++ with pstl support?

I’m tring to build a standalone clang toolchain but libcxx doesn’t support pstl now.

cmake -G "Ninja" \
  -DCMAKE_C_COMPILER=clang \
  -DCMAKE_CXX_COMPILER=clang++ \
  -DLLVM_USE_LINKER=lld \
  -DLLVM_ENABLE_PROJECTS="clang;lld;lldb;pstl" \
  -DLLVM_TARGETS_TO_BUILD=Native \
  -DCLANG_ENABLE_BOOTSTRAP=ON \
  -DCMAKE_BUILD_TYPE=Release \
  -DCLANG_DEFAULT_CXX_STDLIB=libc++ \
  -DCLANG_DEFAULT_RTLIB=compiler-rt \
  -DLLVM_ENABLE_RUNTIMES="compiler-rt;libc;libcxx;libcxxabi;libunwind" \
  -DLIBCXX_USE_COMPILER_RT=YES \
  -DLIBCXXABI_USE_COMPILER_RT=YES \
  -DLIBCXXABI_USE_LLVM_UNWINDER=YES \
  -DLIBUNWIND_USE_COMPILER_RT=Yes \
  -DPSTL_PARALLEL_BACKEND="tbb" \
  -DBOOTSTRAP_CMAKE_BUILD_TYPE=Release \
  -DBOOTSTRAP_LLVM_ENABLE_PROJECTS="clang;lld;lldb;pstl" \
  -DBOOTSTRAP_LLVM_ENABLE_RUNTIMES="compiler-rt;libc;libcxx;libcxxabi;libunwind" \
  -DBOOTSTRAP_CLANG_DEFAULT_CXX_STDLIB=libc++ \
  -DBOOTSTRAP_CLANG_DEFAULT_RTLIB=compiler-rt \
  -DBOOTSTRAP_LIBCXX_USE_COMPILER_RT=YES \
  -DBOOTSTRAP_LIBCXXABI_USE_COMPILER_RT=YES \
  -DBOOTSTRAP_LIBCXXABI_USE_LLVM_UNWINDER=YES \
  -DBOOTSTRAP_LLVM_USE_LINKER=lld \
  -DBOOTSTRAP_LIBUNWIND_USE_COMPILER_RT=Yes \
  -DBOOTSTRAP_PSTL_PARALLEL_BACKEND="tbb" \
  ../src/llvm

But it always show me:

-- 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.
-- Parallel STL uses the serial backend

How could I build libc++ with pstl support? I have seeked answer for three days but google and SO can’t find its answer.

I have tried it:

mkdir build && cd build
cmake -G "Ninja" \
  -DCMAKE_C_COMPILER=clang \
  -DCMAKE_CXX_COMPILER=clang++ \
  -DLLVM_USE_LINKER=lld \
  -DLLVM_ENABLE_PROJECTS="clang;lld;lldb;libc;pstl" \
  -DLLVM_TARGETS_TO_BUILD=Native \
  -DCLANG_ENABLE_BOOTSTRAP=ON \
  -DCMAKE_BUILD_TYPE=Release \
  -DCLANG_DEFAULT_CXX_STDLIB=libc++ \
  -DCLANG_DEFAULT_RTLIB=compiler-rt \
  -DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" \
  -DLIBCXX_USE_COMPILER_RT=YES \
  -DLIBCXXABI_USE_COMPILER_RT=YES \
  -DLIBCXXABI_USE_LLVM_UNWINDER=YES \
  -DLIBUNWIND_USE_COMPILER_RT=Yes \
  -DBOOTSTRAP_CMAKE_BUILD_TYPE=Release \
  -DBOOTSTRAP_LLVM_ENABLE_PROJECTS="clang;lld;lldb;pstl" \
  -DBOOTSTRAP_LLVM_ENABLE_RUNTIMES="compiler-rt;libc;libcxx;libcxxabi;libunwind" \
  -DBOOTSTRAP_CLANG_DEFAULT_CXX_STDLIB=libc++ \
  -DBOOTSTRAP_CLANG_DEFAULT_RTLIB=compiler-rt \
  -DBOOTSTRAP_LIBCXX_USE_COMPILER_RT=YES \
  -DBOOTSTRAP_LIBCXXABI_USE_COMPILER_RT=YES \
  -DBOOTSTRAP_LIBCXXABI_USE_LLVM_UNWINDER=YES \
  -DBOOTSTRAP_LLVM_USE_LINKER=lld \
  -DBOOTSTRAP_LIBUNWIND_USE_COMPILER_RT=Yes \
  ../src/llvm
ninja 
ninja stage2

same can’t find ParallelSTL, it shows:

/home/leen/tools/llvm-project/src/libc/utils/testutils/RandUtils.cpp:11:10: fatal error: 'cstdlib' file not found
#include <cstdlib>
         ^~~~~~~~~
1 error generated.
``

Currently libc++ is broken with the PSTL. We’re working on integrating it properly, but that will take a while. See ⚙ D141779 [libc++][PSTL] Copy the headers into libc++ for the stack implementing it.

Ok, Thank you. I can do something else rather than bootstrap before it fixed.