You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support for building universal x86 / Apple Silicon (arm64) app
This adds support for building MacVim as a fat binary (aka universal
app) for x86_64 / arm64 in CI.
The main challenge mostly lies in configuring the scripting language
default search paths for the libraries, and linking against gettext.
There are two possible approaches:
1. configure/build each arch completely separately, and then use `lipo`
to stitch them back together. This is pretty annoying to set up, and
kind of manual to do, and requires building the same thing twice,
which is not great.
2. Build once with `--with-macarchs="x86_64 arm64` flag, which is what
we do here.
gettext: Homebrew doesn't support fat binaries, and we also need to
build a custom x86 version of gettext to support down to macOS 10.9
anyway, so we manually download the bottle for arm64 gettext bottle, and
then stitch it with the x86 version to create a unified binary under
/usr/local/lib. This way we can just link against it in one go.
Scripting languages: Add new ifdef's to load different libs under
different architecture. Modify configure to support that (instead of
hacking a patch in during CI like Ruby). This means while on x86_64 it
will look under /usr/local/lib for Python 3, on arm64 it will look under
/opt/homebrew instead (this is the recommended path for Homebrew
installs for native arm64 packages). This new path is very specific to
Homebrew which is not ideal, but we could change this later and maybe
make the default search path logic for scripting languages smarter.
Note that since there is no arm64 in CI right now, this just builds the
app, but there will be no automatic testing to make sure it actually
works.
This is part of #1136.
0 commit comments