From d0644fa9bfc3fa3abdd886d2ef13533778317154 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Fri, 24 Jun 2022 23:48:17 +0800 Subject: ci(release): build a universal binary on macOS After some tweaks to our dep builds, we can now build a universal binary for macOS by using `CMAKE_OSX_ARCHITECTURES`. So, let's do that. This requires a number of additional changes: 1. We need to build on macOS 11, since earlier versions do not support building universal (M1 + Intel) binaries. 2. We need to provision a universal `libintl`. The linker will look for an ARM64 version of this library when linking the `nvim` binary. While we're here: 1. Link statically to `libintl`. This allows to to avoid having to do any install name rewriting or codesigning to package Neovim. 2. Bump the `MACOSX_DEPLOYMENT_TARGET` to `11`. We're already using a `libintl` built by Homebrew (through the pre-installed version of `gettext`), and that is built for macOS 11. In order to ensure we link to `libintl.a` instead of `libintl.dylib`, we have to make sure that CMake can't find the latter. This ideally should be a matter of doing `brew unlink gettext`. However, CMake is too adept at finding things that Homebrew has installed (even when not linked), so we have to do a bit more than that. This appears in the additional step ensuring static linkage to `libintl`. We end up breaking some Homebrew-installed software in the process, and some of these software is called during our build (e.g. curl, git, wget). To avoid any adverse effects, let's just uninstall them. --- .github/workflows/notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows/notes.md') diff --git a/.github/workflows/notes.md b/.github/workflows/notes.md index 3bd6c739a5..86f9e8e618 100644 --- a/.github/workflows/notes.md +++ b/.github/workflows/notes.md @@ -22,7 +22,7 @@ ${NVIM_VERSION} 1. Download **nvim-macos.tar.gz** 2. Extract: `tar xzvf nvim-macos.tar.gz` -3. Run `./nvim-osx64/bin/nvim` +3. Run `./nvim-macos/bin/nvim` ### Linux (x64) -- cgit