mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-02 14:25:41 +08:00
remove workaround for zig < 0.16
This commit is contained in:
@@ -50,7 +50,7 @@ trait UnixSystemUtilTrait
|
|||||||
$defined = array_unique($defined);
|
$defined = array_unique($defined);
|
||||||
sort($defined);
|
sort($defined);
|
||||||
// export
|
// export
|
||||||
if (SPCTarget::getTargetOS() === 'Linux') {
|
if (SPCTarget::getTargetOS() === 'Linux' && ToolchainManager::getToolchainClass() !== ZigToolchain::class) {
|
||||||
file_put_contents("{$lib_file}.dynsym", "{\n" . implode("\n", array_map(fn ($x) => " {$x};", $defined)) . "};\n");
|
file_put_contents("{$lib_file}.dynsym", "{\n" . implode("\n", array_map(fn ($x) => " {$x};", $defined)) . "};\n");
|
||||||
} else {
|
} else {
|
||||||
file_put_contents("{$lib_file}.dynsym", implode("\n", $defined) . "\n");
|
file_put_contents("{$lib_file}.dynsym", implode("\n", $defined) . "\n");
|
||||||
@@ -72,10 +72,6 @@ trait UnixSystemUtilTrait
|
|||||||
if (!is_file($symbol_file)) {
|
if (!is_file($symbol_file)) {
|
||||||
throw new SPCInternalException("The symbol file {$symbol_file} does not exist, please check if nm command is available.");
|
throw new SPCInternalException("The symbol file {$symbol_file} does not exist, please check if nm command is available.");
|
||||||
}
|
}
|
||||||
// https://github.com/ziglang/zig/issues/24662
|
|
||||||
if (ToolchainManager::getToolchainClass() === ZigToolchain::class) {
|
|
||||||
return '-Wl,--export-dynamic'; // needs release 0.16, can be removed then
|
|
||||||
}
|
|
||||||
// macOS/zig
|
// macOS/zig
|
||||||
if (SPCTarget::getTargetOS() !== 'Linux' || ToolchainManager::getToolchainClass() === ZigToolchain::class) {
|
if (SPCTarget::getTargetOS() !== 'Linux' || ToolchainManager::getToolchainClass() === ZigToolchain::class) {
|
||||||
return "-Wl,-exported_symbols_list,{$symbol_file}";
|
return "-Wl,-exported_symbols_list,{$symbol_file}";
|
||||||
|
|||||||
@@ -43,20 +43,20 @@ $no_strip = false;
|
|||||||
$upx = false;
|
$upx = false;
|
||||||
|
|
||||||
// whether to test frankenphp build, only available for macOS and linux
|
// whether to test frankenphp build, only available for macOS and linux
|
||||||
$frankenphp = false;
|
$frankenphp = true;
|
||||||
|
|
||||||
// prefer downloading pre-built packages to speed up the build process
|
// prefer downloading pre-built packages to speed up the build process
|
||||||
$prefer_pre_built = true;
|
$prefer_pre_built = true;
|
||||||
|
|
||||||
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
|
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
|
||||||
$extensions = match (PHP_OS_FAMILY) {
|
$extensions = match (PHP_OS_FAMILY) {
|
||||||
'Linux', 'Darwin' => 'decimal',
|
'Linux', 'Darwin' => 'openssl,brotli',
|
||||||
'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',
|
'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',
|
||||||
};
|
};
|
||||||
|
|
||||||
// If you want to test shared extensions, add them below (comma separated, example `bcmath,openssl`).
|
// If you want to test shared extensions, add them below (comma separated, example `bcmath,openssl`).
|
||||||
$shared_extensions = match (PHP_OS_FAMILY) {
|
$shared_extensions = match (PHP_OS_FAMILY) {
|
||||||
'Linux' => '',
|
'Linux' => 'zstd',
|
||||||
'Darwin' => '',
|
'Darwin' => '',
|
||||||
'Windows' => '',
|
'Windows' => '',
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user