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.