mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-13 11:55:36 +08:00
add zts limit for parallel
This commit is contained in:
21
src/SPC/builder/extension/parallel.php
Normal file
21
src/SPC/builder/extension/parallel.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace SPC\builder\extension;
|
||||||
|
|
||||||
|
use SPC\builder\Extension;
|
||||||
|
use SPC\exception\WrongUsageException;
|
||||||
|
use SPC\util\CustomExt;
|
||||||
|
|
||||||
|
#[CustomExt('parallel')]
|
||||||
|
class parallel extends Extension
|
||||||
|
{
|
||||||
|
public function getConfigureArg(): string
|
||||||
|
{
|
||||||
|
if (!$this->builder->getOption('enable-zts')) {
|
||||||
|
throw new WrongUsageException('ext-parallel must be built with ZTS builds. Use "--enable-zts" option!');
|
||||||
|
}
|
||||||
|
return parent::getConfigureArg(); // TODO: Change the autogenerated stub
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user