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