../../third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/string.h:96:46: error: unknown type name 'size_t'
../../third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/stdlib.h:143:12: error: no member named 'ldiv' in the global namespace
I can still use Xcode to build by using "gn gen --ide=xcode", but I am not able to specify the static lib target in Xcode. So I would prefer continuing to use ninja.
I have tried removing the CommandLineTools and reselect Xcode using xcode-select (https://forums.swift.org/t/is-anyone-else-getting-this-error-when-building-the-compiler-from-master-on-macos/36113/2), and even install the mainstream llvm side by side, but still get the same errors.
Any ideas about how to solve the problem?