mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 16:55:38 +08:00
fix libc detection too
This commit is contained in:
@@ -60,17 +60,17 @@ class SPCTarget
|
|||||||
if (str_contains($target, '-musl')) {
|
if (str_contains($target, '-musl')) {
|
||||||
return 'musl';
|
return 'musl';
|
||||||
}
|
}
|
||||||
if (str_contains($target, '-linux')) {
|
if (PHP_OS_FAMILY === 'Linux') {
|
||||||
return 'musl';
|
return SystemUtil::isMuslDist() ? 'musl' : 'glibc';
|
||||||
}
|
|
||||||
if (PHP_OS_FAMILY === 'Linux' && str_contains($target, '-native')) {
|
|
||||||
return 'musl';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$libc = getenv('SPC_LIBC');
|
$libc = getenv('SPC_LIBC');
|
||||||
if ($libc !== false) {
|
if ($libc !== false) {
|
||||||
return $libc;
|
return $libc;
|
||||||
}
|
}
|
||||||
|
if (PHP_OS_FAMILY === 'Linux') {
|
||||||
|
return SystemUtil::isMuslDist() ? 'musl' : 'glibc';
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user