Don't build universal binaries for macOS / iOS when dev_build=yes, to save on dev build time
This change just about halves my build time (godot-cpp as an example):
- 8:30 building
universal - 4:30 building
x86_64
Unsurprisingly, it also halves my build size:
- 772mb
universal - 388mb
x86_64
While I agree that macOS export default should be universal, in dev mode it would be better to default to single arch.
As far as I can see, godot is not capable of building universal at all. I think they must build the two arches separately and join them together after the build.
Edit: Confirmed, at least the GitHub runner runs them separately and then:
https://github.com/godotengine/godot/blob/a3080477ac0421aef24ca0916c40559abbf4846b/.github/workflows/macos_builds.yml#L79
Ah, ok, so we're doing something totally different than Godot. :-/ I guess we'll need to decide if we want to switch to matching Godot, update Godot to match godot-cpp, or decide if we have a compelling argument to differ from Godot. This is probably worth discussing at an upcoming GDExtension meeting.
Switching to a built-twice-then-join approach may actually be better in more ways than just feature parity. I've run into the problem already that passing arch-specific flags (like -mavx) stops the build entirely. There may be a way to detect these kinds of args in the CCFlags, and split them for the two different compiles, but that seems fruitless long term.
Making this a draft because it may be superseded by #1633.