mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
Move opcache JIT handling from Linux and MacOS builders to Extension
This commit is contained in:
parent
e9dbeb1e34
commit
ed67393d33
@ -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
|
||||
|
||||
@ -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) ?
|
||||
|
||||
@ -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() . ' ' .
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user