Refactor, supports shared extension build now !

This commit is contained in:
crazywhalecc
2025-03-24 23:50:12 +08:00
parent 76c353e790
commit aa4d4db11f
19 changed files with 218 additions and 103 deletions

View File

@@ -5,7 +5,17 @@ declare(strict_types=1);
namespace SPC\builder\extension;
use SPC\builder\Extension;
use SPC\util\DynamicExt;
use SPC\exception\RuntimeException;
use SPC\util\CustomExt;
#[DynamicExt]
class xdebug extends Extension {}
#[CustomExt('xdebug')]
class xdebug extends Extension
{
public function runSharedExtensionCheckUnix(): void
{
[$ret] = shell()->execWithResult(BUILD_BIN_PATH . '/php -n -d "zend_extension=' . BUILD_LIB_PATH . '/xdebug.so" --ri xdebug');
if ($ret !== 0) {
throw new RuntimeException('xdebug.so not found');
}
}
}