Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build gettext/libsodium universal binary properly in CI #1443

Merged
merged 1 commit into from
Oct 14, 2023

Conversation

ychin
Copy link
Member

@ychin ychin commented Oct 14, 2023

When Apple Silicon came out, we needed to get universal binaries of gettext/libsodium to link against, and solved it in a somewhat hacky temporary solution by just downloading the bottles from Homebrew and patching them with the x86_64 version. However, Homebrew only maintains bottles for 3 recent OSes, and with macOS 14's release, they no longer have bottles for macOS 11, which we still want to support as it's a recent OS. As such, we need to build the arm64 version of the packages in CI as well instead of just downloading.

When installing from source, Homebrew uses a custom "clang" script that injects compiler flags including "-march" which will cause clang to fail to work when building universal binaries (since it doesn't make sense to specify Intel architectures when specifying -arch arm64). Just force it to use system clang instead to avoid inject unwanted flags.

When Apple Silicon came out, we needed to get universal binaries of
gettext/libsodium to link against, and solved it in a somewhat hacky
temporary solution by just downloading the bottles from Homebrew and
patching them with the x86_64 version. However, Homebrew only maintains
bottles for 3 recent OSes, and with macOS 14's release, they no longer
have bottles for macOS 11, which we still want to support as it's a
recent OS. As such, we need to build the arm64 version of the packages
in CI as well instead of just downloading.

When installing from source, Homebrew uses a custom "clang" script that
injects compiler flags including "-march" which will cause clang to fail
to work when building universal binaries (since it doesn't make sense
to specify Intel architectures when specifying `-arch arm64`). Just
force it to use system clang instead to avoid inject unwanted flags.
@ychin ychin added Infrastructure Non-app infrastructure issues, e.g. CI Non User Facing Non-user facing change. These issues do no need to show up in release notes. labels Oct 14, 2023
@ychin ychin added this to the Release 179 milestone Oct 14, 2023
@github-actions github-actions bot added the CI Vim upstream label for CI issues label Oct 14, 2023
@ychin ychin merged commit 8406cbc into macvim-dev:master Oct 14, 2023
4 checks passed
@ychin ychin deleted the build-libsodium-gettext-arm64 branch October 14, 2023 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Vim upstream label for CI issues Infrastructure Non-app infrastructure issues, e.g. CI Non User Facing Non-user facing change. These issues do no need to show up in release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant