mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
fix native chain
This commit is contained in:
parent
fd89e83798
commit
d275d6cc69
@ -47,18 +47,19 @@ class SPCTarget
|
|||||||
*/
|
*/
|
||||||
public static function getLibc(): ?string
|
public static function getLibc(): ?string
|
||||||
{
|
{
|
||||||
$target = getenv('SPC_TARGET');
|
if ($target = getenv('SPC_TARGET')) {
|
||||||
if (str_contains($target, '-gnu')) {
|
if (str_contains($target, '-gnu')) {
|
||||||
return 'glibc';
|
return 'glibc';
|
||||||
}
|
}
|
||||||
if (str_contains($target, '-musl')) {
|
if (str_contains($target, '-musl')) {
|
||||||
return 'musl';
|
return 'musl';
|
||||||
}
|
}
|
||||||
if (str_contains($target, '-linux')) {
|
if (str_contains($target, '-linux')) {
|
||||||
return 'musl';
|
return 'musl';
|
||||||
}
|
}
|
||||||
if (PHP_OS_FAMILY === 'Linux' && str_contains($target, '-native')) {
|
if (PHP_OS_FAMILY === 'Linux' && str_contains($target, '-native')) {
|
||||||
return 'musl';
|
return 'musl';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$libc = getenv('SPC_LIBC');
|
$libc = getenv('SPC_LIBC');
|
||||||
if ($libc !== false) {
|
if ($libc !== false) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user