Pretty basic question. I want to build the swift binaries as "fat" so they will work on both intel and apple silicon Macs, to give backward compatibility for people using old Macs.
I see the switch for utils/build-script looks like --host-target HOST_TARGET but I'm guessing you can't use it twice or pass two architectures? --host-target arm64;i386?
I know I could just try multiple attempts but the builds take hours so I thought I'd ask people if they have immediate feedback before I start!
Carl
p.s. If there's absolutely no way to do this normally, I can probably live with doing the build twice, once for apple silicon and once for intel and making sure I keep the built binaries separate in my IDE, but it's clunky.
To be clear, I'm not saying I want to build a compiler that's capable of building code for Intel and Apple Silicon... I'm saying I want the compiler itself to be able to run on both of those architectures!
I don't have a working Intel machine at the moment (my old MacBook is needing repair) but I'm betting if I run the above compiler on it it won't work? Up to now, the solution I've come up with (which I don't like) is to run a Terminal in Rosetta2 mode, then build swift there, so it builds an Intel binary. Then that Intel binary can be deployed to anyone, but most users will have Apple Silicon machines and will be running their compilers under Rosetta2... slower and less efficient.