Add example library to be able to test libcxx with EXTERNAL_THREAD_API mode.
Add cmake variable -DLIBCXX_TESTING_EXTERNAL_THREAD_API, and modify
testing configuration and build files, to be able to build libcxx in such mode.
Add cmake cache file for -DLIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY.
Co-authored-by: Mikhail Maltsev <mikhail.maltsev@arm.com>
I would like this test to be enabled unconditionally. We should always be testing it, and I don't want to add more logic to the CMake just to enable a test for another configuration.
Also, since this is just adding a test, we should be able to do so without touching the main CMakeLists.txt at all. The only code changes should be under libcxx/test, and the test should run through Lit like the other ones. I recognize this might be more work, but stringing the test of a given configuration by hacking around libc++'s build itself is just not a sustainable direction.