File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,9 @@ public function getDynamicExportSymbolsArgument(): ?string
4949 throw new WrongUsageException ('You must build libphp.a before calling this function. ' );
5050 }
5151
52- $ cmd = 'nm -g --defined-only -P ' . escapeshellarg ($ libphp ) . ' 2>/dev/null ' ;
52+ $ cmd = (SPCTarget::getTargetOS () === 'Linux ' )
53+ ? 'nm -g --defined-only -P ' . escapeshellarg ($ libphp ) . ' 2>/dev/null '
54+ : 'nm -gUj ' . escapeshellarg ($ libphp ) . ' 2>/dev/null ' ;
5355 $ out = shell_exec ($ cmd ) ?: '' ;
5456 if ($ out !== '' ) {
5557 foreach (preg_split ('/\R/ ' , trim ($ out )) as $ line ) {
@@ -89,7 +91,7 @@ public function getDynamicExportSymbolsArgument(): ?string
8991 $ argument = '-Wl,--export-dynamic ' ; // https://github.com/ziglang/zig/issues/24662
9092 }
9193 if (SPCTarget::getTargetOS () !== 'Linux ' ) {
92- $ argument = "-Wl,-exported_symbols_list {$ exportList }" ;
94+ $ argument = "-Wl,-exported_symbols_list, {$ exportList }" ;
9395 }
9496
9597 $ this ->dynamic_export_list = $ argument ;
You can’t perform that action at this time.
0 commit comments