mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-08 09:25:35 +08:00
Fix shared extension does not build bug
This commit is contained in:
@@ -9,14 +9,15 @@ use SPC\builder\BuilderProvider;
|
|||||||
use SPC\builder\macos\MacOSBuilder;
|
use SPC\builder\macos\MacOSBuilder;
|
||||||
use SPC\store\Config;
|
use SPC\store\Config;
|
||||||
use Symfony\Component\Console\Input\ArgvInput;
|
use Symfony\Component\Console\Input\ArgvInput;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
|
||||||
|
|
||||||
class SPCConfigUtil
|
class SPCConfigUtil
|
||||||
{
|
{
|
||||||
public function __construct(private ?BuilderBase $builder = null, ?InputInterface $input = null)
|
private ?BuilderBase $builder = null;
|
||||||
|
|
||||||
|
public function __construct(?BuilderBase $builder = null)
|
||||||
{
|
{
|
||||||
if ($builder === null) {
|
if ($builder !== null) {
|
||||||
$this->builder = BuilderProvider::makeBuilderByInput($input ?? new ArgvInput());
|
$this->builder = $builder; // BuilderProvider::makeBuilderByInput($input ?? new ArgvInput());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,8 +26,11 @@ class SPCConfigUtil
|
|||||||
[$extensions, $libraries] = DependencyUtil::getExtsAndLibs($extensions, $libraries, $include_suggest_ext, $include_suggest_lib);
|
[$extensions, $libraries] = DependencyUtil::getExtsAndLibs($extensions, $libraries, $include_suggest_ext, $include_suggest_lib);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
$this->builder->proveLibs($libraries);
|
if ($this->builder === null) {
|
||||||
$this->builder->proveExts($extensions);
|
$this->builder = BuilderProvider::makeBuilderByInput(new ArgvInput());
|
||||||
|
$this->builder->proveLibs($libraries);
|
||||||
|
$this->builder->proveExts($extensions);
|
||||||
|
}
|
||||||
ob_get_clean();
|
ob_get_clean();
|
||||||
$ldflags = $this->getLdflagsString();
|
$ldflags = $this->getLdflagsString();
|
||||||
$libs = $this->getLibsString($libraries);
|
$libs = $this->getLibsString($libraries);
|
||||||
|
|||||||
Reference in New Issue
Block a user