fix native chain

This commit is contained in:
DubbleClick
2025-07-01 18:06:18 +07:00
parent fd89e83798
commit d275d6cc69

View File

@@ -47,7 +47,7 @@ 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';
} }
@@ -60,6 +60,7 @@ class SPCTarget
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) {
return $libc; return $libc;