mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Fix phpunit, add skip extraction arg for SPCConfigUtil new builder
This commit is contained in:
parent
720e700701
commit
2da750d5f9
@ -173,7 +173,7 @@ abstract class BuilderBase
|
||||
* @throws \Throwable|WrongUsageException
|
||||
* @internal
|
||||
*/
|
||||
public function proveExts(array $static_extensions, array $shared_extensions = [], bool $skip_check_deps = false): void
|
||||
public function proveExts(array $static_extensions, array $shared_extensions = [], bool $skip_check_deps = false, bool $skip_extract = false): void
|
||||
{
|
||||
CustomExt::loadCustomExt();
|
||||
// judge ext
|
||||
@ -189,17 +189,20 @@ abstract class BuilderBase
|
||||
throw new WrongUsageException('Extension [' . $ext . '] does not support shared build!');
|
||||
}
|
||||
}
|
||||
$this->emitPatchPoint('before-php-extract');
|
||||
SourceManager::initSource(sources: ['php-src'], source_only: true);
|
||||
$this->emitPatchPoint('after-php-extract');
|
||||
if ($this->getPHPVersionID() >= 80000) {
|
||||
$this->emitPatchPoint('before-micro-extract');
|
||||
SourceManager::initSource(sources: ['micro'], source_only: true);
|
||||
$this->emitPatchPoint('after-micro-extract');
|
||||
if (!$skip_extract) {
|
||||
$this->emitPatchPoint('before-php-extract');
|
||||
SourceManager::initSource(sources: ['php-src'], source_only: true);
|
||||
$this->emitPatchPoint('after-php-extract');
|
||||
if ($this->getPHPVersionID() >= 80000) {
|
||||
$this->emitPatchPoint('before-micro-extract');
|
||||
SourceManager::initSource(sources: ['micro'], source_only: true);
|
||||
$this->emitPatchPoint('after-micro-extract');
|
||||
}
|
||||
$this->emitPatchPoint('before-exts-extract');
|
||||
SourceManager::initSource(exts: [...$static_extensions, ...$shared_extensions]);
|
||||
$this->emitPatchPoint('after-exts-extract');
|
||||
}
|
||||
$this->emitPatchPoint('before-exts-extract');
|
||||
SourceManager::initSource(exts: [...$static_extensions, ...$shared_extensions]);
|
||||
$this->emitPatchPoint('after-exts-extract');
|
||||
|
||||
foreach ([...$static_extensions, ...$shared_extensions] as $extension) {
|
||||
$class = CustomExt::getExtClass($extension);
|
||||
/** @var Extension $ext */
|
||||
|
||||
@ -50,7 +50,7 @@ class SPCConfigUtil
|
||||
if ($this->builder === null) {
|
||||
$this->builder = BuilderProvider::makeBuilderByInput(new ArgvInput());
|
||||
$this->builder->proveLibs($libraries);
|
||||
$this->builder->proveExts($extensions);
|
||||
$this->builder->proveExts($extensions, skip_extract: true);
|
||||
}
|
||||
ob_get_clean();
|
||||
$ldflags = $this->getLdflagsString();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user