Skip to content

Commit ad356b4

Browse files
committed
Fix grpc build
1 parent 8c4e3d5 commit ad356b4

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

config/ext.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,9 @@
255255
"zlib",
256256
"openssl",
257257
"libcares"
258+
],
259+
"frameworks": [
260+
"CoreFoundation"
258261
]
259262
},
260263
"iconv": {

src/SPC/builder/extension/grpc.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ public function patchBeforeBuildconf(): bool
3333
'GRPC_LIBDIR=' . BUILD_LIB_PATH . "\n" . 'LDFLAGS="$LDFLAGS -framework CoreFoundation"'
3434
);
3535
}
36+
FileSystem::replaceFileStr("{$this->source_dir}/config.m4", "CFLAGS=\"-std=c11 -g -O2\"\n", '');
37+
file_put_contents("{$this->source_dir}/php_grpc.h", '#include "src/php/ext/grpc/php_grpc.h"');
3638
return true;
3739
}
3840

src/globals/test-extensions.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
// '8.1',
1717
// '8.2',
1818
// '8.3',
19-
// '8.4',
19+
'8.4',
2020
'8.5',
2121
// 'git',
2222
];
2323

2424
// test os (macos-15-intel, macos-15, ubuntu-latest, windows-latest are available)
2525
$test_os = [
26-
// 'macos-15-intel', // bin/spc for x86_64
27-
// 'macos-15', // bin/spc for arm64
26+
'macos-15-intel', // bin/spc for x86_64
27+
'macos-15', // bin/spc for arm64
2828
// 'ubuntu-latest', // bin/spc-alpine-docker for x86_64
2929
'ubuntu-22.04', // bin/spc-gnu-docker for x86_64
3030
'ubuntu-24.04', // bin/spc for x86_64
@@ -35,7 +35,7 @@
3535
];
3636

3737
// whether enable thread safe
38-
$zts = true;
38+
$zts = false;
3939

4040
$no_strip = false;
4141

@@ -50,7 +50,7 @@
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' => 'pgsql',
53+
'Linux', 'Darwin' => 'grpc',
5454
'Windows' => 'com_dotnet',
5555
};
5656

0 commit comments

Comments
 (0)