mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-04 15:25:41 +08:00
Merge branch 'main' into php-85
# Conflicts: # src/SPC/builder/linux/LinuxBuilder.php # src/SPC/store/source/PhpSource.php # src/globals/test-extensions.php
This commit is contained in:
@@ -65,7 +65,7 @@ class BuildPHPCommand extends BuildCommand
|
||||
// check dynamic extension build env
|
||||
// linux must build with glibc
|
||||
if (!empty($shared_extensions) && SPCTarget::isStatic()) {
|
||||
$this->output->writeln('Linux does not support dynamic extension loading with musl-libc full-static build, please build with shared target!');
|
||||
$this->output->writeln('Linux does not support dynamic extension loading with fully static builds, please build with a shared C runtime target!');
|
||||
return static::FAILURE;
|
||||
}
|
||||
$static_and_shared = array_intersect($static_extensions, $shared_extensions);
|
||||
|
||||
@@ -5,6 +5,8 @@ declare(strict_types=1);
|
||||
namespace SPC\command;
|
||||
|
||||
use SPC\exception\ValidationException;
|
||||
use SPC\toolchain\ToolchainManager;
|
||||
use SPC\toolchain\ZigToolchain;
|
||||
use SPC\util\ConfigValidator;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Process\Process;
|
||||
@@ -71,7 +73,16 @@ class CraftCommand extends BuildCommand
|
||||
$retcode = $this->runCommand('install-pkg', 'go-xcaddy');
|
||||
if ($retcode !== 0) {
|
||||
$this->output->writeln('<error>craft go-xcaddy failed</error>');
|
||||
$this->log("craft go-xcaddy failed with code: {$retcode}", true);
|
||||
$this->log("craft: spc install-pkg go-xcaddy failed with code: {$retcode}", true);
|
||||
return static::FAILURE;
|
||||
}
|
||||
}
|
||||
// install zig if requested
|
||||
if (ToolchainManager::getToolchainClass() === ZigToolchain::class) {
|
||||
$retcode = $this->runCommand('install-pkg', 'zig');
|
||||
if ($retcode !== 0) {
|
||||
$this->output->writeln('<error>craft zig failed</error>');
|
||||
$this->log("craft: spc install-pkg zig failed with code: {$retcode}", true);
|
||||
return static::FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user