mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-14 04:15:35 +08:00
Add SPC_LIBC mapping to SPC_TARGET
This commit is contained in:
@@ -68,7 +68,9 @@ class GlobalEnvManager
|
|||||||
logger()->warning('SPC_LIBC is deprecated, please use SPC_TARGET instead.');
|
logger()->warning('SPC_LIBC is deprecated, please use SPC_TARGET instead.');
|
||||||
$target = match (getenv('SPC_LIBC')) {
|
$target = match (getenv('SPC_LIBC')) {
|
||||||
'musl' => SPCTarget::MUSL_STATIC,
|
'musl' => SPCTarget::MUSL_STATIC,
|
||||||
default => SPCTarget::GLIBC,
|
'musl-shared' => SPCTarget::MUSL,
|
||||||
|
'glibc' => SPCTarget::GLIBC,
|
||||||
|
default => throw new WrongUsageException('Unsupported SPC_LIBC value: ' . getenv('SPC_LIBC')),
|
||||||
};
|
};
|
||||||
self::putenv("SPC_TARGET={$target}");
|
self::putenv("SPC_TARGET={$target}");
|
||||||
self::putenv('SPC_LIBC');
|
self::putenv('SPC_LIBC');
|
||||||
|
|||||||
Reference in New Issue
Block a user