mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-08 17:35:36 +08:00
bring back opcache jit fix
This commit is contained in:
@@ -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']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user