mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
fix macos, for real this time
This commit is contained in:
parent
1ba92ccc99
commit
3f74d58503
@ -49,13 +49,9 @@ abstract class UnixBuilderBase extends BuilderBase
|
||||
throw new WrongUsageException('You must build libphp.a before calling this function.');
|
||||
}
|
||||
|
||||
$cmd = (SPCTarget::getTargetOS() === 'Linux')
|
||||
? 'nm -g --defined-only -P ' . escapeshellarg($libphp) . ' 2>/dev/null'
|
||||
: 'nm -gUj ' . escapeshellarg($libphp) . ' 2>/dev/null';
|
||||
$out = shell_exec($cmd) ?: '';
|
||||
if ($out !== '') {
|
||||
if ($out = shell_exec('nm -g --defined-only -P ' . escapeshellarg($libphp) . ' 2>/dev/null')) {
|
||||
foreach (preg_split('/\R/', trim($out)) as $line) {
|
||||
if ($line === '') {
|
||||
if ($line === '' || str_ends_with($line, '.o:')) {
|
||||
continue;
|
||||
}
|
||||
$name = strtok($line, " \t");
|
||||
|
||||
@ -50,13 +50,13 @@ $prefer_pre_built = false;
|
||||
|
||||
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
|
||||
$extensions = match (PHP_OS_FAMILY) {
|
||||
'Linux', 'Darwin' => 'swoole,swoole-hook-mysql,swoole-hook-pgsql,swoole-hook-sqlite,swoole-hook-odbc,apcu,bcmath,bz2,calendar,ctype,curl,dba,dom,event,exif,fileinfo,filter,ftp,gd,gmp,iconv,imagick,intl,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pcntl,pdo,pdo_mysql,pgsql,phar,posix,protobuf,readline,redis,session,shmop,simplexml,soap,sockets,sodium,sqlite3,swoole,sysvmsg,sysvsem,sysvshm,tokenizer,xml,xmlreader,xmlwriter,xsl,zip,zlib',
|
||||
'Linux', 'Darwin' => 'bcmath',
|
||||
'Windows' => 'bcmath,bz2,calendar,ctype,curl,dom,exif,fileinfo,filter,ftp,iconv,xml,mbstring,mbregex,mysqlnd,openssl,pdo,pdo_mysql,pdo_sqlite,phar,session,simplexml,soap,sockets,sqlite3,tokenizer,xmlwriter,xmlreader,zlib,zip',
|
||||
};
|
||||
|
||||
// If you want to test shared extensions, add them below (comma separated, example `bcmath,openssl`).
|
||||
$shared_extensions = match (PHP_OS_FAMILY) {
|
||||
'Linux' => '',
|
||||
'Linux' => 'zip',
|
||||
'Darwin' => '',
|
||||
'Windows' => '',
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user