Skip to content

Commit c78acce

Browse files
committed
Fix macOS 15 Intel RELEASE builds by disabling JIT
Disable opcache JIT for macOS 15 Intel (x86_64) RELEASE builds to work around Clang 17 tail call optimization bug that causes compilation failure in zend_jit_vm_helpers.c. The error occurs due to incompatibility between PHP JIT musttail attributes and Clang 17's tail call elimination. - DEBUG builds on macOS 15 Intel: JIT remains enabled - ARM64 builds (macOS 14): unaffected, JIT works normally - Other platforms: no changes
1 parent 2ad69e5 commit c78acce

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/build-macos.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,13 @@ jobs:
7474
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/zlib/lib/pkgconfig"
7575
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_OPT/icu4c/lib/pkgconfig"
7676
sed -i -e 's/Requires.private:.*//g' "$BREW_OPT/curl/lib/pkgconfig/libcurl.pc"
77-
77+
78+
# Disable JIT for macOS 15 Intel (x86_64) RELEASE builds due to Clang 17 tail call optimization bug
79+
JIT_FLAG=""
80+
if [[ "${{ matrix.os }}" == "15-intel" && "${{ matrix.debug }}" == "false" ]]; then
81+
JIT_FLAG="--disable-opcache-jit"
82+
fi
83+
7884
./buildconf --force
7985
./configure \
8086
--enable-option-checking=fatal \
@@ -127,7 +133,8 @@ jobs:
127133
--with-config-file-scan-dir=/etc/php.d \
128134
--${{ matrix.debug && 'enable' || 'disable' }}-debug \
129135
--${{ matrix.zts && 'enable' || 'disable' }}-zts \
130-
--enable-async
136+
--enable-async \
137+
$JIT_FLAG
131138
132139
- name: Build PHP
133140
run: |-

0 commit comments

Comments
 (0)