With the bootstrapping build of Clang 15 and the following options:
PROJECTS="clang;clang-tools-extra"
RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind;openmp"
LLVM_SOURCE=$SOURCEDIR/llvm
echo "LLVM Source: ${LLVM_SOURCE}"
#exit 0
mkdir -p $BUILDDIR
cd $SOURCEDIR
export CXXFLAGS="-Wno-unused-command-line-argument $CXXFLAGS"
export CFLAGS="-Wno-unused-command-line-argument $CFLAGS"
cd $BUILDDIR
#rem(){
CPATH="/usr/include/x86_64-linux-gnu" LIBRARY_PATH="/usr/lib/x86_64-linux-gnu" \
cmake -GNinja -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_INSTALL_PREFIX=$INSTALLDIR \
-DLLVM_ENABLE_LIBCXX=ON \
-DLLVM_LIT_ARGS="-sv -j12" \
-DCLANG_DEFAULT_CXX_STDLIB=libc++ \
-DLIBOMPTARGET_ENABLE_DEBUG=ON \
-DLLVM_ENABLE_PROJECTS=$PROJECTS \
-DLLVM_ENABLE_RUNTIMES=$RUNTIMES \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
-DLLVM_INSTALL_UTILS=ON \
-DLIBOMPTARGET_BUILD_CUDA_PLUGIN=False \
-DLIBOMPTARGET_BUILD_AMDGPU_PLUGIN=False \
$LLVM_SOURCE
#}
I am unable to find libc++ in the built compiler library directory, hence all my compilation efforts ended with clang++: error while loading shared libraries: libc++.so.1: cannot open shared object file: No such file or directory
. I am unsure why the libcxx runtime is not being built. Here are the compilation logs Clang bootstraping - Pastebin.com