diff --git a/src/SPC/builder/extension/opcache.php b/src/SPC/builder/extension/opcache.php index d982978f..6e203779 100644 --- a/src/SPC/builder/extension/opcache.php +++ b/src/SPC/builder/extension/opcache.php @@ -52,10 +52,12 @@ class opcache extends Extension public function getUnixConfigureArg(bool $shared = false): string { $version = $this->builder->getPHPVersion(); + $opcache_jit = !$this->builder->getOption('disable-opcache-jit', false); + $opcache_jit = $opcache_jit ? '--enable-opcache-jit' : '--disable-opcache-jit'; if (version_compare($version, '8.5.0-dev', '<')) { - return '--enable-opcache'; + return "--enable-opcache {$opcache_jit}"; } - return ''; + return $opcache_jit; } public function getDistName(): string diff --git a/src/SPC/builder/linux/LinuxBuilder.php b/src/SPC/builder/linux/LinuxBuilder.php index 6a0766ab..db251071 100644 --- a/src/SPC/builder/linux/LinuxBuilder.php +++ b/src/SPC/builder/linux/LinuxBuilder.php @@ -80,13 +80,6 @@ class LinuxBuilder extends UnixBuilderBase $zts = ''; } - $opcache_jit = !$this->getOption('disable-opcache-jit', false); - if ($opcache_jit) { - $opcache_jit = $phpVersionID >= 80500 ? '--enable-opcache-jit ' : ''; - } else { - $opcache_jit = '--disable-opcache-jit '; - } - $config_file_path = $this->getOption('with-config-file-path', false) ? ('--with-config-file-path=' . $this->getOption('with-config-file-path') . ' ') : ''; $config_file_scan_dir = $this->getOption('with-config-file-scan-dir', false) ? diff --git a/src/SPC/builder/macos/MacOSBuilder.php b/src/SPC/builder/macos/MacOSBuilder.php index 50353e32..44b0d0c3 100644 --- a/src/SPC/builder/macos/MacOSBuilder.php +++ b/src/SPC/builder/macos/MacOSBuilder.php @@ -101,13 +101,6 @@ class MacOSBuilder extends UnixBuilderBase $json_74 = $phpVersionID < 80000 ? '--enable-json ' : ''; $zts = $this->getOption('enable-zts', false) ? '--enable-zts --disable-zend-signals ' : ''; - $opcache_jit = !$this->getOption('disable-opcache-jit', false); - if ($opcache_jit) { - $opcache_jit = $phpVersionID >= 80500 ? '--enable-opcache-jit ' : ''; - } else { - $opcache_jit = '--disable-opcache-jit '; - } - $config_file_path = $this->getOption('with-config-file-path', false) ? ('--with-config-file-path=' . $this->getOption('with-config-file-path') . ' ') : ''; $config_file_scan_dir = $this->getOption('with-config-file-scan-dir', false) ? @@ -146,7 +139,6 @@ class MacOSBuilder extends UnixBuilderBase ($enableMicro ? '--enable-micro ' : '--disable-micro ') . $config_file_path . $config_file_scan_dir . - $opcache_jit . $json_74 . $zts . $this->makeStaticExtensionArgs() . ' ' .