After D10690 lands, libc++'s locale code will compile on CloudABI, with the exception of the following two bits:
- CloudABI doesn't have setlocale(), as the C library does not keep track of any global state. The global locale is always set to "C". Disable the call to setlocale() on this system.
- Similarly, mbtowc_l() is also not present, as it is also not thread-safe. As CloudABI does not support state-dependent encodings, simply disable that part of the logic.
After D10690 and this patch hit the tree, the locale code will compile out of the box on CloudABI.