Allow for native Apple M1 ARM builds! #1298
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In 2020, Apple introduced their own ARM chip, the M1, which replaced the Intel x86_64 chips they had been using.
Consequently, all modern macs run on ARM processors and run ARM code.
Etterna has only been able to work on them because Apple provided Rosetta v2, a translation layer allowing our x86_64 mac builds to be dynamically JIT-d into ARM code, which can be run.
However, this JIT process has some overhead and produces less efficient code than code compiled for the target processor in the first place, and more importantly Rosetta v2 will have support dropped for it at some point in the future.
This PR allows Etterna to be built for Apple Silicon targets, and is an important first step in the process of automatically generating Apple-Silicon-compatible releases.
The other two major components are telling GHA to build for Apple Silicion targets, and notarizing our executable so it can actually be distributed (see: #1292)
Depends-on: #1297 , as without it Etterna will not compile for macOS at all, even for a x86_64 target.