Before r290850, building libcxx with -DLIBCXX_HAS_EXTERNAL_THREAD_API=ON had two uses:
- Allow platform vendors to plug-in an __external_threading header which should take care of the entire threading infrastructure of libcxx
- Allow testing of an externally-threaded library build; where the thread API is declared using pthread data structures, and the implementation of this API is provided as a separate library (test/support/external_threads.cpp) and linked-in when running the test suite.
r290850 breaks the second use case (pthread data structures are no longer available). This patch re-stores the ability to build+test an externally-threaded library variant on a pthread based system.
This wasn't caught on any of the official bots because we don't have any builds of the externally-threaded library build at the moment (apart from my downstream one).