static compilation is not quite working yet

This commit is contained in:
DubbleClick
2025-04-30 21:46:27 +07:00
parent e7d6f37e98
commit 2c13eb257b
4 changed files with 7 additions and 18 deletions

View File

@@ -5,25 +5,14 @@ declare(strict_types=1);
namespace SPC\builder\extension;
use SPC\builder\Extension;
use SPC\exception\WrongUsageException;
use SPC\util\CustomExt;
#[CustomExt('spx')]
class spx extends Extension
{
/**
* @throws WrongUsageException
*/
public function validate(): void
{
if ($this->builder->getOption('enable-zts')) {
throw new WrongUsageException('ext-spx is not thread safe, do not build it with ZTS builds');
}
}
public function getUnixConfigureArg(bool $shared = false): string
{
$arg = '--enable-spx';
$arg = '--enable-SPX';
if ($this->builder->getExt('zlib') === null) {
$arg .= ' --with-zlib-dir=' . BUILD_ROOT_PATH;
}