[libc++] Allow building without threads in standalone builds

Setting _LIBCPP_HAS_NO_THREADS is needed when building libcxxabi without
threads in standalone mode. This is useful when target WASM. Otherwise,
you get an error like "No thread API" when building libcxxabi.

It would be better to link against a properly-configured libc++ headers
CMake target when building libc++abi instead, but we don't generate such
targets yet.

Thanks to Matthew Bauer for the patch.

Differential Revision: https://reviews.llvm.org/D60743

Cr-Mirrored-From: https://chromium.googlesource.com/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: da104444fafbc8f657f06c2188ab2e8284563e3d
1 file changed