From what I understood, it is not able to find the headers of some of the libraries. The errors happen during the test phase.
I was able to build the project with Ninja. What is the development flow when using this option? I would like to inspect the standard library. I like the user experience that Xcode offers (that's why I was trying to build it using Xcode).
I felt the exact same way when I started with compiler development. But ultimately, Ninja is much more ergonomic and robust than Xcode for this kind of thing. I use Xcode for editing individual source files (by double-clicking them in Finder), but not as the full-fledged IDE with .xcodeproj files. Your best bet may be to learn Ninja despite the learning curve.
I have talked with an expert who manages to use Xcode for debugging the compiler, so it's not entirely impossible.