Build x86_64 Swift toolchain on an apple silicon mac

Hey guys, may I ask what is the best practice for building an x86_64 Swift toolchain on an apple silicon mac?

I found these 2 approaches:

  1. run build-script in Rosetta like:
arch -x86_64  ../swift/utils/build-script ...

But I saw some failures like FAILED: bin/swift-demangle by doing this.

  1. specify cross-compile-hosts=macosx-x86_64 for build-script

That is currently unsupported, though @edymtt appears to have been working on it in the last month.