From 091e120ada5e19b60969181dda09377d0a73abc2 Mon Sep 17 00:00:00 2001 From: Yee Cheng Chin Date: Tue, 7 Apr 2026 19:24:01 -0700 Subject: [PATCH] ci: Don't use GNU iconv for legacy builds We are only using GNU iconv instead of native one because in newer macOS versions the system iconv is buggy. This isn't an issue for older macOS versions. Building with GNU iconv makes the build chain more complicated for self-hosted VMs and it also increases binary size so we don't want to do this unless it's necessary. --- .github/workflows/macvim-buildtest.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/macvim-buildtest.yaml b/.github/workflows/macvim-buildtest.yaml index d45cd251dc..26f62ae81c 100644 --- a/.github/workflows/macvim-buildtest.yaml +++ b/.github/workflows/macvim-buildtest.yaml @@ -89,10 +89,10 @@ jobs: xcode-select -p xcodebuild -version - # Set up, install, and cache GNU libiconv library to work around Apple iconv issues. + # Set up, install, and cache GNU libiconv library to work around Apple iconv issues in newer macOS versions. - name: Set up libiconv - if: inputs.publish + if: inputs.publish && !inputs.legacy uses: ./.github/actions/universal-package with: formula: libiconv @@ -106,7 +106,7 @@ jobs: with: formula: gettext contents: lib/libintl.a,lib/libintl.dylib - gnuiconv: true # gettext needs to match MacVim in using the same version of iconv + gnuiconv: ${{ inputs.legacy == false }} # gettext needs to match MacVim in using the same version of iconv # Set up, install, and cache libsodium library for encryption. @@ -232,7 +232,7 @@ jobs: sed -i.bak -f ci/config.mk.optimized.sed src/auto/config.mk fi - if ${{ inputs.publish == true }}; then + if ${{ inputs.publish == true && inputs.legacy == false }}; then # Use Homebrew GNU libiconv since Apple iconv has been broken since macOS 14 sed -i.bak -f ci/config.mk.brew-libiconv.sed src/auto/config.mk fi @@ -286,7 +286,7 @@ jobs: echo 'Found external dynamic linkage!'; false fi - if ${{ inputs.publish == true }}; then + if ${{ inputs.publish == true && inputs.legacy == false }}; then # Make sure we are not using system iconv, which has been buggy since macOS 14. if otool -L ${VIM_BIN} | grep '^\s*/usr/lib/libiconv'; then echo 'Using system iconv! We should be linking against GNU iconv instead.'; false