[libc++] Re-apply the workaround for timespec_get not always being available in Apple SDKs
This commit re-applies 99f3b231, which was reverted in 81424257 because it broke the modules build. The modules failure was a circular dependency between the Darwin module and __config. Specifically, the issue was that if <__config> includes a system header, the std_config module depends on the Darwin module. However, the Darwin module already depends on the std_config header because some of its headers include libc++ headers like <ctype.h> (they mean to include the C <ctype.h>, but libc++ headers are first in the header search path). This is fixed by moving the workaround to <ctime> only. https://llvm.org/PR47208 rdar://68157284
Loading
Please sign in to comment