Hi,
currently the following fails:
clang++ -stdlib=libc++ -static ./test.cpp
because libc++ needs libc++abi and pthreads.
This change has already been proposed in a different version, using -static-libc++ in https://reviews.llvm.org/D63329
And https://reviews.llvm.org/D60794 tried to do it in libc++ instead of clang.
This version makes both linking with -static as above work, as well as -static-libstdc++ -stdlib=libc++.