Skip to content

Commit be24fd9

Browse files
committed
remove workaround for zig < 0.16
1 parent bf1f54a commit be24fd9

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/SPC/builder/traits/UnixSystemUtilTrait.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public static function exportDynamicSymbols(string $lib_file): void
5050
$defined = array_unique($defined);
5151
sort($defined);
5252
// export
53-
if (SPCTarget::getTargetOS() === 'Linux') {
53+
if (SPCTarget::getTargetOS() === 'Linux' && ToolchainManager::getToolchainClass() !== ZigToolchain::class) {
5454
file_put_contents("{$lib_file}.dynsym", "{\n" . implode("\n", array_map(fn ($x) => " {$x};", $defined)) . "};\n");
5555
} else {
5656
file_put_contents("{$lib_file}.dynsym", implode("\n", $defined) . "\n");
@@ -72,10 +72,6 @@ public static function getDynamicExportedSymbols(string $lib_file): ?string
7272
if (!is_file($symbol_file)) {
7373
throw new SPCInternalException("The symbol file {$symbol_file} does not exist, please check if nm command is available.");
7474
}
75-
// https://github.com/ziglang/zig/issues/24662
76-
if (ToolchainManager::getToolchainClass() === ZigToolchain::class) {
77-
return '-Wl,--export-dynamic'; // needs release 0.16, can be removed then
78-
}
7975
// macOS/zig
8076
if (SPCTarget::getTargetOS() !== 'Linux' || ToolchainManager::getToolchainClass() === ZigToolchain::class) {
8177
return "-Wl,-exported_symbols_list,{$symbol_file}";

src/globals/test-extensions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,20 @@
4343
$upx = false;
4444

4545
// whether to test frankenphp build, only available for macOS and linux
46-
$frankenphp = false;
46+
$frankenphp = true;
4747

4848
// prefer downloading pre-built packages to speed up the build process
4949
$prefer_pre_built = true;
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' => 'decimal',
53+
'Linux', 'Darwin' => 'openssl,brotli',
5454
'Windows' => 'bcmath,brotli,bz2,ctype,curl,dom,exif,fileinfo,filter,ftp,gd,iconv,intl,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pdo,pdo_mysql,pdo_pgsql,pgsql,session,simdjson,simplexml,sodium,sqlite3,tokenizer,xml,xmlreader,xmlwriter,zip,zlib',
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' => 'zstd',
6060
'Darwin' => '',
6161
'Windows' => '',
6262
};

0 commit comments

Comments
 (0)