bring back opcache jit fix

This commit is contained in:
DubbleClick
2025-07-01 16:57:56 +07:00
parent 27f57cc23a
commit 88f9172866
3 changed files with 16 additions and 10 deletions

View File

@@ -4,28 +4,24 @@ declare(strict_types=1);
namespace SPC\builder\unix\library;
use SPC\exception\FileSystemException;
use SPC\exception\RuntimeException;
use SPC\toolchain\ToolchainManager;
use SPC\toolchain\ZigToolchain;
use SPC\util\executor\UnixCMakeExecutor;
trait libaom
{
/**
* @throws RuntimeException
* @throws FileSystemException
*/
protected function build(): void
{
$extra = getenv('COMPILER_EXTRA');
if (ToolchainManager::getToolchainClass() === ZigToolchain::class) {
f_putenv('COMPILER_EXTRA=-D_GNU_SOURCE');
$new = trim($extra . ' -D_GNU_SOURCE');
f_putenv("COMPILER_EXTRA={$new}");
}
UnixCMakeExecutor::create($this)
->setBuildDir("{$this->source_dir}/builddir")
->addConfigureArgs('-DAOM_TARGET_CPU=generic')
->build();
f_putenv('COMPILER_EXTRA');
f_putenv("COMPILER_EXTRA={$extra}");
$this->patchPkgconfPrefix(['aom.pc']);
}
}