Skip to content

Commit 3f74d58

Browse files
committed
fix macos, for real this time
1 parent 1ba92cc commit 3f74d58

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/SPC/builder/unix/UnixBuilderBase.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,9 @@ public function getDynamicExportSymbolsArgument(): ?string
4949
throw new WrongUsageException('You must build libphp.a before calling this function.');
5050
}
5151

52-
$cmd = (SPCTarget::getTargetOS() === 'Linux')
53-
? 'nm -g --defined-only -P ' . escapeshellarg($libphp) . ' 2>/dev/null'
54-
: 'nm -gUj ' . escapeshellarg($libphp) . ' 2>/dev/null';
55-
$out = shell_exec($cmd) ?: '';
56-
if ($out !== '') {
52+
if ($out = shell_exec('nm -g --defined-only -P ' . escapeshellarg($libphp) . ' 2>/dev/null')) {
5753
foreach (preg_split('/\R/', trim($out)) as $line) {
58-
if ($line === '') {
54+
if ($line === '' || str_ends_with($line, '.o:')) {
5955
continue;
6056
}
6157
$name = strtok($line, " \t");

src/globals/test-extensions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@
5050

5151
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
5252
$extensions = match (PHP_OS_FAMILY) {
53-
'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',
53+
'Linux', 'Darwin' => 'bcmath',
5454
'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',
5555
};
5656

5757
// If you want to test shared extensions, add them below (comma separated, example `bcmath,openssl`).
5858
$shared_extensions = match (PHP_OS_FAMILY) {
59-
'Linux' => '',
59+
'Linux' => 'zip',
6060
'Darwin' => '',
6161
'Windows' => '',
6262
};

0 commit comments

Comments
 (0)