Changes to enable building all MacOS types on any MacOS host#53
Merged
Conversation
3645a26 to
f10effc
Compare
Member
Author
|
Will remove the test commit before merging. Unfortunately, this is really the only way to test it before it gets merged. |
75cf71a to
c0f3fec
Compare
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 to be able to use a "dev" branch of shared-actions for testing. Unfortunately, the 'uses' parameter has to be a static string, which is why we are limited to a specific branch named 'dev'.
bastelfreak
approved these changes
Sep 1, 2025
adce98e to
e636212
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.