Skip to content

Commit 091e120

Browse files
committed
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.
1 parent ae67b87 commit 091e120

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/macvim-buildtest.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ jobs:
8989
xcode-select -p
9090
xcodebuild -version
9191
92-
# Set up, install, and cache GNU libiconv library to work around Apple iconv issues.
92+
# Set up, install, and cache GNU libiconv library to work around Apple iconv issues in newer macOS versions.
9393

9494
- name: Set up libiconv
95-
if: inputs.publish
95+
if: inputs.publish && !inputs.legacy
9696
uses: ./.github/actions/universal-package
9797
with:
9898
formula: libiconv
@@ -106,7 +106,7 @@ jobs:
106106
with:
107107
formula: gettext
108108
contents: lib/libintl.a,lib/libintl.dylib
109-
gnuiconv: true # gettext needs to match MacVim in using the same version of iconv
109+
gnuiconv: ${{ inputs.legacy == false }} # gettext needs to match MacVim in using the same version of iconv
110110

111111
# Set up, install, and cache libsodium library for encryption.
112112

@@ -232,7 +232,7 @@ jobs:
232232
sed -i.bak -f ci/config.mk.optimized.sed src/auto/config.mk
233233
fi
234234
235-
if ${{ inputs.publish == true }}; then
235+
if ${{ inputs.publish == true && inputs.legacy == false }}; then
236236
# Use Homebrew GNU libiconv since Apple iconv has been broken since macOS 14
237237
sed -i.bak -f ci/config.mk.brew-libiconv.sed src/auto/config.mk
238238
fi
@@ -286,7 +286,7 @@ jobs:
286286
echo 'Found external dynamic linkage!'; false
287287
fi
288288
289-
if ${{ inputs.publish == true }}; then
289+
if ${{ inputs.publish == true && inputs.legacy == false }}; then
290290
# Make sure we are not using system iconv, which has been buggy since macOS 14.
291291
if otool -L ${VIM_BIN} | grep '^\s*/usr/lib/libiconv'; then
292292
echo 'Using system iconv! We should be linking against GNU iconv instead.'; false

0 commit comments

Comments
 (0)