--attach-window was fixed for non-Windows a while ago. MAME itself compiles and runs on Big Sur fine with Xcode 12 with the caveat that Metal rendering broke so you have to -video opengl. I'm not sure yet if it's SDL or BGFX's fault.
Ahh, that shows how out of it I am, I didn't even know it was using Metal nowadays! I haven't built my own in so long, Ive just been using NegaMAME for awhile now since I use Negatron as my front end. If I use good old vanilla I just grab it from lngn.net. Im guessing the reason it hasn't crashed on me is because Negatron is set to openGL in the prefs..