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
{{ message }}
Repository navigation
Epic: Build universal app to support Apple Silicon #1136
We need to get an universal app built for MacVim that will work both on Apple Silicon / M1 Macs. Currently MacVim is buildable under Apple Silicon, but the binary release is only x86 and will work in Apple Silicon under Rosetta. This is usually not a big deal but it's less efficient, and it makes it impossible to interface with native Python / Ruby / etc in plugins.
Tracking some tasks that we need to do or dependencies:
Homebrew support for Apple Silicon. We mostly need it to work for external packages like gettext and other scripting languages.
They already support Apple Silicon in unofficial manner, with /opt/homebrew/ currently the tentative folder for arm64 packages (since Homebrew is planning to only support thin binaries for now, they have to put these packages at a difference place).
Modify CI build scripts to generate universal app. MacVim itself is easy via a single Xcode setting, but to build Vim itself we need to either get the compiler to generate universal binary or use lipo to stitch it together. Also, it's unclear if each CI instance builds their own non-universal app and we combine them in a later CI step, or each CI builds an universal app separately (which is annoying because then we need to cross-compile with all the dependencies available).
Update Homebrew-core's formula, so brew install macvim also gets Apple Silicon version.
Documentation for users for how to use this, turn on/off, configure scripting languages.
Thinking more about this, I don't know what this actually means. MacVim works right now and there really isn't much you need to know about as a user. Just crossing this off.
@ichizok Yes it will work, but as I mentioned, we still need to get both ARM and x86 versions of dependencies (gettext, python, etc) on the same build machine since Vim needs to be built against them. Right now we use Homebrew to do it, but I don't think it quite has full support for doing that yet. We also need to make sure the Apple Silicon version of MacVim knows where to grab pythonthreedll from correctly.
Actually I'm not sure if we are supposed to use arm64e. I remember when I looked into it a few months ago, it's not really an officially supported target yet, and Apple's docs just calls for arm64.
Also, we don't need to add to CFLAGS I think. configure script already supports a --with-macarchs flag to do that for us.
I didn't know --with-macarchs... thank you.
As to arm64e, since Apple native apps and executables are built for arm64e (and x86_64) so I just thought of using it and not particular about it.
And I overlooked Sparkle is built for arm64 but not arm64e thus MacVim cannot be for arm64e now.
(Speaking of this point, using CFLAGS is applied to MacVim.app/Contents/MacOS/Vim and not to MacVim so then Vim is built for arm64e/x86_64 and MacVim is for arm64/x86_64)
We are currently building for Apple Silicon in CI! It will build the app, but no testing support though since we don't have M1 Macs in CI yet. Testing will have to be done manually.
Reacted by Juan Villela, Eir Nym, Andy Aylward, syumai and MapleFENG
Ok this is bad. Merging upstream Vim changes can cause GitHub issue closure markers to trigger, which closed this issue from a completely unrelated Vim issue.
Activity
ichizok commentedon Dec 10, 2020
For building Vim as universal:
xcrun --sdk macosx11.0 clang(on 10.15. on 11.0 is ok to default)-arch arm64e -arch x86_64to CFLAGS and LDFLAGSref:
https://github.com/ichizok/macvim/tree/build-universal
https://travis-ci.com/github/ichizok/macvim/jobs/445399373
ychin commentedon Dec 10, 2020
@ichizok Yes it will work, but as I mentioned, we still need to get both ARM and x86 versions of dependencies (gettext, python, etc) on the same build machine since Vim needs to be built against them. Right now we use Homebrew to do it, but I don't think it quite has full support for doing that yet. We also need to make sure the Apple Silicon version of MacVim knows where to grab
pythonthreedllfrom correctly.MacVim Snapshot 167
ychin commentedon Dec 12, 2020
Actually I'm not sure if we are supposed to use
arm64e. I remember when I looked into it a few months ago, it's not really an officially supported target yet, and Apple's docs just calls forarm64.Also, we don't need to add to CFLAGS I think.
configurescript already supports a--with-macarchsflag to do that for us.MacVim Snapshot 168
ichizok commentedon Dec 14, 2020
I didn't know
--with-macarchs... thank you.As to arm64e, since Apple native apps and executables are built for arm64e (and x86_64) so I just thought of using it and not particular about it.
And I overlooked Sparkle is built for arm64 but not arm64e thus MacVim cannot be for arm64e now.
(Speaking of this point, using
CFLAGSis applied toMacVim.app/Contents/MacOS/Vimand not toMacVimso thenVimis built for arm64e/x86_64 andMacVimis for arm64/x86_64)Support for building universal x86 / Apple Silicon (arm64) app
ychin commentedon Dec 23, 2020
We are currently building for Apple Silicon in CI! It will build the app, but no testing support though since we don't have M1 Macs in CI yet. Testing will have to be done manually.
[-]Build universal app to support Apple Silicon[/-][+]Epic: Build universal app to support Apple Silicon[/+]patch 9.0.1089: unnessary assignment
ychin commentedon Mar 23, 2023
Ok this is bad. Merging upstream Vim changes can cause GitHub issue closure markers to trigger, which closed this issue from a completely unrelated Vim issue.
Edit: See https://github.com/orgs/community/discussions/17308