Move opcache JIT handling from Linux and MacOS builders to Extension

This commit is contained in:
crazywhalecc
2025-07-29 11:22:58 +08:00
parent e9dbeb1e34
commit ed67393d33
3 changed files with 4 additions and 17 deletions

View File

@@ -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