Swift compiler crashing - Illegal instruction: 4

Hi, after updating to Big Sur, XCode is failing to build my project with this error:

Illegal instruction: 4

Here is the end of the exported XCode logs:



Doing further research, It seems that the command swift-frontend itself is crashing, stuck in hoistChecksInLoop

Here is the crash report:



I found this thread https://developer.apple.com/forums/thread/61213, that looks related, but this is old ...
Is there something I can do, which does not involve removing all loops from my code or rolling back to catalina ?

I've also created a feedback ticket there: https://feedbackassistant.apple.com/feedback/9111121

Incompatibility of the version of Firefox you are using ?

You should ask Firefox directly.
I will.
But the exact same code was building well with Catalina, just before upgrading, and compiler should not crash anyway.
Swift compiler crashing - Illegal instruction: 4
 
 
Q