Great news!! I feel like a real compiler hacker now .
I resolved the build issues using advice from this thread: Building Swift compiler from source fails when not using Ninja - #16 by ksluder and Build failure on Apple Silicon M1 Mac Mini - #9 by hpwooten.
While I couldn't get the build to pass with the --test
flag, I discovered that there's a live Swift bug re: the getting started steps for this exact error message! - [SR-15747] cmark test failure results in incomplete compiler build · Issue #58024 · apple/swift · GitHub
The main culprit was my python3 binary was x86-64 rather than arm64. I also had to use the --bootstrapping=off
flag as suggested in the above thread.