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
|
* @throws \Throwable|WrongUsageException
|
||||||
* @internal
|
* @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();
|
CustomExt::loadCustomExt();
|
||||||
// judge ext
|
// judge ext
|
||||||
@ -189,17 +189,20 @@ abstract class BuilderBase
|
|||||||
throw new WrongUsageException('Extension [' . $ext . '] does not support shared build!');
|
throw new WrongUsageException('Extension [' . $ext . '] does not support shared build!');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->emitPatchPoint('before-php-extract');
|
if (!$skip_extract) {
|
||||||
SourceManager::initSource(sources: ['php-src'], source_only: true);
|
$this->emitPatchPoint('before-php-extract');
|
||||||
$this->emitPatchPoint('after-php-extract');
|
SourceManager::initSource(sources: ['php-src'], source_only: true);
|
||||||
if ($this->getPHPVersionID() >= 80000) {
|
$this->emitPatchPoint('after-php-extract');
|
||||||
$this->emitPatchPoint('before-micro-extract');
|
if ($this->getPHPVersionID() >= 80000) {
|
||||||
SourceManager::initSource(sources: ['micro'], source_only: true);
|
$this->emitPatchPoint('before-micro-extract');
|
||||||
$this->emitPatchPoint('after-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) {
|
foreach ([...$static_extensions, ...$shared_extensions] as $extension) {
|
||||||
$class = CustomExt::getExtClass($extension);
|
$class = CustomExt::getExtClass($extension);
|
||||||
/** @var Extension $ext */
|
/** @var Extension $ext */
|
||||||
|
|||||||
@ -50,7 +50,7 @@ class SPCConfigUtil
|
|||||||
if ($this->builder === null) {
|
if ($this->builder === null) {
|
||||||
$this->builder = BuilderProvider::makeBuilderByInput(new ArgvInput());
|
$this->builder = BuilderProvider::makeBuilderByInput(new ArgvInput());
|
||||||
$this->builder->proveLibs($libraries);
|
$this->builder->proveLibs($libraries);
|
||||||
$this->builder->proveExts($extensions);
|
$this->builder->proveExts($extensions, skip_extract: true);
|
||||||
}
|
}
|
||||||
ob_get_clean();
|
ob_get_clean();
|
||||||
$ldflags = $this->getLdflagsString();
|
$ldflags = $this->getLdflagsString();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user