Changes to enable building all MacOS types on any MacOS host #53
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.
This makes several changes that enable us to build for all supported MacOS versions on any kind of MacOS host running the latest version. It sets some flags to tell clang to generate binaries compatible with everything since MacOS 13. This also adds an osx-15-x86_64 platform, and tweaks the build task to make sure you are running in a shell for the architecture you are trying to build for. By using the 'arch' command to open a shell for x86_64 before invoking the build rake task, we use Rosetta 2 to allow us to build for x86_64 on an arm64 host just like we would if we were building on an x86_64 host. This allows us to avoid any of the many workarounds needed for cross compiling. While this method is rather slow, it easier and potentially safer than all of the workarounds needed for cross-compilation.
This also uses a platform string of macos-all-<arch> since we are now able to build for all supported MacOS versions in one binary. This also modifies the build action to allow overriding the vanagon branch and shared-actions branch for easier testing.