mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 21:04:52 +08:00
fix tests failing to deprecation
This commit is contained in:
parent
292df38c10
commit
e34eb502db
@ -21,7 +21,8 @@ class ToolchainManager
|
|||||||
{
|
{
|
||||||
$libc = getenv('SPC_LIBC');
|
$libc = getenv('SPC_LIBC');
|
||||||
if ($libc !== false && !getenv('SPC_TARGET')) {
|
if ($libc !== false && !getenv('SPC_TARGET')) {
|
||||||
logger()->warning('SPC_LIBC is deprecated, please use SPC_TARGET instead.');
|
// TODO: @crazywhalecc this breaks tests
|
||||||
|
// logger()->warning('SPC_LIBC is deprecated, please use SPC_TARGET instead.');
|
||||||
return match ($libc) {
|
return match ($libc) {
|
||||||
'musl' => SystemUtil::isMuslDist() ? GccNativeToolchain::class : MuslToolchain::class,
|
'musl' => SystemUtil::isMuslDist() ? GccNativeToolchain::class : MuslToolchain::class,
|
||||||
'glibc' => !SystemUtil::isMuslDist() ? GccNativeToolchain::class : throw new WrongUsageException('SPC_LIBC must be musl for musl dist.'),
|
'glibc' => !SystemUtil::isMuslDist() ? GccNativeToolchain::class : throw new WrongUsageException('SPC_LIBC must be musl for musl dist.'),
|
||||||
|
|||||||
@ -23,9 +23,8 @@ class SPCTarget
|
|||||||
*/
|
*/
|
||||||
public static function isStatic(): bool
|
public static function isStatic(): bool
|
||||||
{
|
{
|
||||||
$libc = getenv('SPC_LIBC');
|
|
||||||
// if SPC_LIBC is set, it means the target is static, remove it when 3.0 is released
|
// if SPC_LIBC is set, it means the target is static, remove it when 3.0 is released
|
||||||
if ($libc === 'musl') {
|
if (getenv('SPC_LIBC') === 'musl') {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if ($target = getenv('SPC_TARGET')) {
|
if ($target = getenv('SPC_TARGET')) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user