remove extra libraries for php configure/make, since they're the same and only depend on the target libc

This commit is contained in:
DubbleClick
2025-07-04 14:27:48 +07:00
parent 3070376fb6
commit d65d82ff0a
7 changed files with 18 additions and 15 deletions

View File

@@ -74,6 +74,17 @@ class SPCTarget
return null;
}
public static function getRuntimeLibs(): string
{
if (PHP_OS_FAMILY === 'Linux') {
return self::getLibc() === 'musl' ? 'ldl -lpthread -lm' : '-ldl -lrt -lpthread -lm -lresolv -lutil';
}
if (PHP_OS_FAMILY === 'Darwin') {
return '-lresolv';
}
return '';
}
/**
* Returns the libc version if set, for other OS, it will always return null.
*/