mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-19 14:55:35 +08:00
Compare commits
21 Commits
ae1193ab16
...
2.7.5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c5ae719b9c | ||
|
|
7b6e707e24 | ||
|
|
0114700dad | ||
|
|
ec9364db69 | ||
|
|
033e29985e | ||
|
|
61cba2342d | ||
|
|
a3acad4ef3 | ||
|
|
1e13eb4abe | ||
|
|
1bac06fe3c | ||
|
|
762a768969 | ||
|
|
d0a6e3a860 | ||
|
|
995187d258 | ||
|
|
5333a04e1c | ||
|
|
19be5263b5 | ||
|
|
6e79401ab5 | ||
|
|
903036f1c0 | ||
|
|
6bd3eea0fe | ||
|
|
f28a3cf5a3 | ||
|
|
c828c2c6e4 | ||
|
|
e437bf2ffe | ||
|
|
a49ae05599 |
4
.github/workflows/build-unix.yml
vendored
4
.github/workflows/build-unix.yml
vendored
@@ -136,12 +136,12 @@ jobs:
|
|||||||
macos-x86_64)
|
macos-x86_64)
|
||||||
DOWN_CMD="composer update --no-dev --classmap-authoritative && ./bin/spc doctor --auto-fix && ./bin/spc download"
|
DOWN_CMD="composer update --no-dev --classmap-authoritative && ./bin/spc doctor --auto-fix && ./bin/spc download"
|
||||||
BUILD_CMD="./bin/spc build"
|
BUILD_CMD="./bin/spc build"
|
||||||
RUNS_ON="macos-13"
|
RUNS_ON="macos-15-intel"
|
||||||
;;
|
;;
|
||||||
macos-aarch64)
|
macos-aarch64)
|
||||||
DOWN_CMD="composer update --no-dev --classmap-authoritative && ./bin/spc doctor --auto-fix && ./bin/spc download"
|
DOWN_CMD="composer update --no-dev --classmap-authoritative && ./bin/spc doctor --auto-fix && ./bin/spc download"
|
||||||
BUILD_CMD="./bin/spc build"
|
BUILD_CMD="./bin/spc build"
|
||||||
RUNS_ON="macos-14"
|
RUNS_ON="macos-15"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
DOWN_CMD="$DOWN_CMD --with-php=${{ inputs.php-version }} --for-extensions=${{ inputs.extensions }} --ignore-cache-sources=php-src"
|
DOWN_CMD="$DOWN_CMD --with-php=${{ inputs.php-version }} --for-extensions=${{ inputs.extensions }} --ignore-cache-sources=php-src"
|
||||||
|
|||||||
8
.github/workflows/ext-matrix-tests.yml
vendored
8
.github/workflows/ext-matrix-tests.yml
vendored
@@ -85,9 +85,9 @@ jobs:
|
|||||||
- "8.4"
|
- "8.4"
|
||||||
operating-system:
|
operating-system:
|
||||||
- "ubuntu-latest"
|
- "ubuntu-latest"
|
||||||
#- "macos-13"
|
#- "macos-15-intel"
|
||||||
#- "debian-arm64-self-hosted"
|
#- "debian-arm64-self-hosted"
|
||||||
- "macos-14"
|
- "macos-15"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout"
|
- name: "Checkout"
|
||||||
@@ -99,11 +99,11 @@ jobs:
|
|||||||
OS=""
|
OS=""
|
||||||
if [ "${{ matrix.operating-system }}" = "ubuntu-latest" ]; then
|
if [ "${{ matrix.operating-system }}" = "ubuntu-latest" ]; then
|
||||||
OS="linux-x86_64"
|
OS="linux-x86_64"
|
||||||
elif [ "${{ matrix.operating-system }}" = "macos-13" ]; then
|
elif [ "${{ matrix.operating-system }}" = "macos-15-intel" ]; then
|
||||||
OS="macos-x86_64"
|
OS="macos-x86_64"
|
||||||
elif [ "${{ matrix.operating-system }}" = "debian-arm64-self-hosted" ]; then
|
elif [ "${{ matrix.operating-system }}" = "debian-arm64-self-hosted" ]; then
|
||||||
OS="linux-aarch64"
|
OS="linux-aarch64"
|
||||||
elif [ "${{ matrix.operating-system }}" = "macos-14" ]; then
|
elif [ "${{ matrix.operating-system }}" = "macos-15" ]; then
|
||||||
OS="macos-aarch64"
|
OS="macos-aarch64"
|
||||||
fi
|
fi
|
||||||
echo "OS=$OS" >> $GITHUB_ENV
|
echo "OS=$OS" >> $GITHUB_ENV
|
||||||
|
|||||||
6
.github/workflows/release-build.yml
vendored
6
.github/workflows/release-build.yml
vendored
@@ -27,7 +27,7 @@ jobs:
|
|||||||
os: "ubuntu-latest"
|
os: "ubuntu-latest"
|
||||||
filename: "spc-linux-x86_64.tar.gz"
|
filename: "spc-linux-x86_64.tar.gz"
|
||||||
- name: "macos-x86_64"
|
- name: "macos-x86_64"
|
||||||
os: "macos-13"
|
os: "macos-15-intel"
|
||||||
filename: "spc-macos-x86_64.tar.gz"
|
filename: "spc-macos-x86_64.tar.gz"
|
||||||
- name: "linux-aarch64"
|
- name: "linux-aarch64"
|
||||||
os: "ubuntu-latest"
|
os: "ubuntu-latest"
|
||||||
@@ -147,11 +147,11 @@ jobs:
|
|||||||
- name: "linux-x86_64"
|
- name: "linux-x86_64"
|
||||||
os: "ubuntu-latest"
|
os: "ubuntu-latest"
|
||||||
- name: "macos-x86_64"
|
- name: "macos-x86_64"
|
||||||
os: "macos-13"
|
os: "macos-15-intel"
|
||||||
- name: "linux-aarch64"
|
- name: "linux-aarch64"
|
||||||
os: "ubuntu-24.04-arm"
|
os: "ubuntu-24.04-arm"
|
||||||
- name: "macos-aarch64"
|
- name: "macos-aarch64"
|
||||||
os: "macos-latest"
|
os: "macos-15"
|
||||||
- name: "windows-x64"
|
- name: "windows-x64"
|
||||||
os: "windows-latest"
|
os: "windows-latest"
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -1152,8 +1152,9 @@
|
|||||||
"support": {
|
"support": {
|
||||||
"BSD": "wip"
|
"BSD": "wip"
|
||||||
},
|
},
|
||||||
"type": "builtin",
|
"type": "external",
|
||||||
"arg-type": "with-path",
|
"source": "ext-zip",
|
||||||
|
"arg-type": "custom",
|
||||||
"arg-type-windows": "enable",
|
"arg-type-windows": "enable",
|
||||||
"lib-depends-unix": [
|
"lib-depends-unix": [
|
||||||
"libzip"
|
"libzip"
|
||||||
|
|||||||
@@ -263,6 +263,15 @@
|
|||||||
"path": "LICENSE"
|
"path": "LICENSE"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ext-zip": {
|
||||||
|
"type": "url",
|
||||||
|
"url": "https://pecl.php.net/get/zip",
|
||||||
|
"filename": "ext-zip.tgz",
|
||||||
|
"license": {
|
||||||
|
"type": "file",
|
||||||
|
"path": "LICENSE"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ext-zstd": {
|
"ext-zstd": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"path": "php-src/ext/zstd",
|
"path": "php-src/ext/zstd",
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ use Symfony\Component\Console\Application;
|
|||||||
*/
|
*/
|
||||||
final class ConsoleApplication extends Application
|
final class ConsoleApplication extends Application
|
||||||
{
|
{
|
||||||
public const string VERSION = '2.7.4';
|
public const string VERSION = '2.7.5';
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
|||||||
17
src/SPC/builder/extension/zip.php
Normal file
17
src/SPC/builder/extension/zip.php
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace SPC\builder\extension;
|
||||||
|
|
||||||
|
use SPC\builder\Extension;
|
||||||
|
use SPC\util\CustomExt;
|
||||||
|
|
||||||
|
#[CustomExt('zip')]
|
||||||
|
class zip extends Extension
|
||||||
|
{
|
||||||
|
public function getUnixConfigureArg(bool $shared = false): string
|
||||||
|
{
|
||||||
|
return !$shared ? '--with-zip=' . BUILD_ROOT_PATH : '--enable-zip=shared';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -156,7 +156,14 @@ class LinuxBuilder extends UnixBuilderBase
|
|||||||
}
|
}
|
||||||
$shared_extensions = array_map('trim', array_filter(explode(',', $this->getOption('build-shared'))));
|
$shared_extensions = array_map('trim', array_filter(explode(',', $this->getOption('build-shared'))));
|
||||||
if (!empty($shared_extensions)) {
|
if (!empty($shared_extensions)) {
|
||||||
logger()->info('Building shared extensions ...');
|
if (SPCTarget::isStatic()) {
|
||||||
|
throw new WrongUsageException(
|
||||||
|
"You're building against musl libc statically (the default on Linux), but you're trying to build shared extensions.\n" .
|
||||||
|
'Static musl libc does not implement `dlopen`, so your php binary is not able to load shared extensions.' . "\n" .
|
||||||
|
'Either use SPC_LIBC=glibc to link against glibc on a glibc OS, or use SPC_TARGET="native-native-musl -dynamic" to link against musl libc dynamically using `zig cc`.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
logger()->info('Building shared extensions...');
|
||||||
$this->buildSharedExts();
|
$this->buildSharedExts();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,111 +4,77 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace SPC\builder\unix\library;
|
namespace SPC\builder\unix\library;
|
||||||
|
|
||||||
use SPC\builder\linux\library\LinuxLibraryBase;
|
use SPC\exception\FileSystemException;
|
||||||
use SPC\exception\BuildFailureException;
|
|
||||||
use SPC\store\FileSystem;
|
use SPC\store\FileSystem;
|
||||||
use SPC\util\PkgConfigUtil;
|
use SPC\util\PkgConfigUtil;
|
||||||
|
use SPC\util\SPCConfigUtil;
|
||||||
use SPC\util\SPCTarget;
|
use SPC\util\SPCTarget;
|
||||||
|
|
||||||
trait postgresql
|
trait postgresql
|
||||||
{
|
{
|
||||||
public function patchBeforeBuild(): bool
|
public function patchBeforeBuild(): bool
|
||||||
{
|
{
|
||||||
|
// fix aarch64 build on glibc 2.17 (e.g. CentOS 7)
|
||||||
if (SPCTarget::getLibcVersion() === '2.17' && GNU_ARCH === 'aarch64') {
|
if (SPCTarget::getLibcVersion() === '2.17' && GNU_ARCH === 'aarch64') {
|
||||||
FileSystem::replaceFileStr(
|
try {
|
||||||
$this->source_dir . '/src/port/pg_popcount_aarch64.c',
|
FileSystem::replaceFileStr("{$this->source_dir}/src/port/pg_popcount_aarch64.c", 'HWCAP_SVE', '0');
|
||||||
'HWCAP_SVE',
|
FileSystem::replaceFileStr(
|
||||||
'0',
|
"{$this->source_dir}/src/port/pg_crc32c_armv8_choose.c",
|
||||||
);
|
'#if defined(__linux__) && !defined(__aarch64__) && !defined(HWCAP2_CRC32)',
|
||||||
FileSystem::replaceFileStr(
|
'#if defined(__linux__) && !defined(HWCAP_CRC32)'
|
||||||
$this->source_dir . '/src/port/pg_crc32c_armv8_choose.c',
|
);
|
||||||
'#if defined(__linux__) && !defined(__aarch64__) && !defined(HWCAP2_CRC32)',
|
} catch (FileSystemException) {
|
||||||
'#if defined(__linux__) && !defined(HWCAP_CRC32)',
|
// allow file not-existence to make it compatible with old and new version
|
||||||
);
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
// skip the test on platforms where libpq infrastructure may be provided by statically-linked libraries
|
||||||
|
FileSystem::replaceFileStr("{$this->source_dir}/src/interfaces/libpq/Makefile", 'invokes exit\'; exit 1;', 'invokes exit\';');
|
||||||
|
// disable shared libs build
|
||||||
|
FileSystem::replaceFileStr(
|
||||||
|
"{$this->source_dir}/src/Makefile.shlib",
|
||||||
|
[
|
||||||
|
'$(LINK.shared) -o $@ $(OBJS) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK)',
|
||||||
|
'$(INSTALL_SHLIB) $< \'$(DESTDIR)$(pkglibdir)/$(shlib)\'',
|
||||||
|
'$(INSTALL_SHLIB) $< \'$(DESTDIR)$(libdir)/$(shlib)\'',
|
||||||
|
'$(INSTALL_SHLIB) $< \'$(DESTDIR)$(bindir)/$(shlib)\'',
|
||||||
|
],
|
||||||
|
''
|
||||||
|
);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function build(): void
|
protected function build(): void
|
||||||
{
|
{
|
||||||
$builddir = BUILD_ROOT_PATH;
|
$libs = array_map(fn ($x) => $x->getName(), $this->getDependencies());
|
||||||
$envs = '';
|
$spc = new SPCConfigUtil($this->getBuilder(), ['no_php' => true, 'libs_only_deps' => true]);
|
||||||
$packages = 'zlib openssl readline libxml-2.0';
|
$config = $spc->config(libraries: $libs, include_suggest_lib: $this->builder->getOption('with-suggested-libs'));
|
||||||
$optional_packages = [
|
|
||||||
'zstd' => 'libzstd',
|
$env_vars = [
|
||||||
'ldap' => 'ldap',
|
'CFLAGS' => $config['cflags'],
|
||||||
'libxslt' => 'libxslt',
|
'CPPFLAGS' => '-DPIC',
|
||||||
'icu' => 'icu-i18n',
|
'LDFLAGS' => $config['ldflags'],
|
||||||
|
'LIBS' => $config['libs'],
|
||||||
];
|
];
|
||||||
$error_exec_cnt = 0;
|
|
||||||
|
|
||||||
foreach ($optional_packages as $lib => $pkg) {
|
if ($ldLibraryPath = getenv('SPC_LD_LIBRARY_PATH')) {
|
||||||
if ($this->builder->getLib($lib)) {
|
$env_vars['LD_LIBRARY_PATH'] = $ldLibraryPath;
|
||||||
$packages .= ' ' . $pkg;
|
|
||||||
$output = shell()->execWithResult("pkg-config --static {$pkg}");
|
|
||||||
$error_exec_cnt += $output[0] === 0 ? 0 : 1;
|
|
||||||
logger()->info(var_export($output[1], true));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$output = shell()->execWithResult("pkg-config --cflags-only-I --static {$packages}");
|
|
||||||
$error_exec_cnt += $output[0] === 0 ? 0 : 1;
|
|
||||||
$macos_15_bug_cflags = PHP_OS_FAMILY === 'Darwin' ? ' -Wno-unguarded-availability-new' : '';
|
|
||||||
$cflags = '';
|
|
||||||
if (!empty($output[1][0])) {
|
|
||||||
$cflags = $output[1][0];
|
|
||||||
$envs .= ' CPPFLAGS="-DPIC"';
|
|
||||||
$cflags = "{$cflags} -fno-ident{$macos_15_bug_cflags}";
|
|
||||||
}
|
|
||||||
$output = shell()->execWithResult("pkg-config --libs-only-L --static {$packages}");
|
|
||||||
$error_exec_cnt += $output[0] === 0 ? 0 : 1;
|
|
||||||
if (!empty($output[1][0])) {
|
|
||||||
$ldflags = $output[1][0];
|
|
||||||
$envs .= " LDFLAGS=\"{$ldflags}\" ";
|
|
||||||
}
|
|
||||||
$output = shell()->execWithResult("pkg-config --libs-only-l --static {$packages}");
|
|
||||||
$error_exec_cnt += $output[0] === 0 ? 0 : 1;
|
|
||||||
if (!empty($output[1][0])) {
|
|
||||||
$libs = $output[1][0];
|
|
||||||
$libcpp = '';
|
|
||||||
if ($this->builder->getLib('icu')) {
|
|
||||||
$libcpp = $this instanceof LinuxLibraryBase ? ' -lstdc++' : ' -lc++';
|
|
||||||
}
|
|
||||||
$envs .= " LIBS=\"{$libs}{$libcpp}\" ";
|
|
||||||
}
|
|
||||||
if ($error_exec_cnt > 0) {
|
|
||||||
throw new BuildFailureException('Failed to get pkg-config information!');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FileSystem::resetDir($this->source_dir . '/build');
|
FileSystem::resetDir($this->source_dir . '/build');
|
||||||
|
|
||||||
# 有静态链接配置 参考文件: src/interfaces/libpq/Makefile
|
|
||||||
shell()->cd($this->source_dir . '/build')
|
|
||||||
->exec('sed -i.backup "s/invokes exit\'; exit 1;/invokes exit\';/" ../src/interfaces/libpq/Makefile')
|
|
||||||
->exec('sed -i.backup "278 s/^/# /" ../src/Makefile.shlib')
|
|
||||||
->exec('sed -i.backup "402 s/^/# /" ../src/Makefile.shlib');
|
|
||||||
|
|
||||||
// php source relies on the non-private encoding functions in libpgcommon.a
|
// php source relies on the non-private encoding functions in libpgcommon.a
|
||||||
FileSystem::replaceFileStr(
|
FileSystem::replaceFileStr(
|
||||||
$this->source_dir . '/src/common/Makefile',
|
"{$this->source_dir}/src/common/Makefile",
|
||||||
'$(OBJS_FRONTEND): CPPFLAGS += -DUSE_PRIVATE_ENCODING_FUNCS',
|
'$(OBJS_FRONTEND): CPPFLAGS += -DUSE_PRIVATE_ENCODING_FUNCS',
|
||||||
'$(OBJS_FRONTEND): CPPFLAGS += -UUSE_PRIVATE_ENCODING_FUNCS -DFRONTEND',
|
'$(OBJS_FRONTEND): CPPFLAGS += -UUSE_PRIVATE_ENCODING_FUNCS -DFRONTEND',
|
||||||
);
|
);
|
||||||
|
|
||||||
$env = [
|
|
||||||
'CFLAGS' => $cflags,
|
|
||||||
];
|
|
||||||
if ($ldLibraryPath = getenv('SPC_LD_LIBRARY_PATH')) {
|
|
||||||
$env['LD_LIBRARY_PATH'] = $ldLibraryPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
// configure
|
// configure
|
||||||
$shell = shell()->cd($this->source_dir . '/build')->initializeEnv($this)
|
$shell = shell()->cd("{$this->source_dir}/build")->initializeEnv($this)
|
||||||
->appendEnv($env)
|
->appendEnv($env_vars)
|
||||||
->exec(
|
->exec(
|
||||||
"{$envs} ../configure " .
|
'../configure ' .
|
||||||
"--prefix={$builddir} " .
|
"--prefix={$this->getBuildRootPath()} " .
|
||||||
'--enable-coverage=no ' .
|
'--enable-coverage=no ' .
|
||||||
'--with-ssl=openssl ' .
|
'--with-ssl=openssl ' .
|
||||||
'--with-readline ' .
|
'--with-readline ' .
|
||||||
@@ -125,6 +91,7 @@ trait postgresql
|
|||||||
'--without-tcl '
|
'--without-tcl '
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// patch ldap lib
|
||||||
if ($this->builder->getLib('ldap')) {
|
if ($this->builder->getLib('ldap')) {
|
||||||
$libs = PkgConfigUtil::getLibsArray('ldap');
|
$libs = PkgConfigUtil::getLibsArray('ldap');
|
||||||
$libs = clean_spaces(implode(' ', $libs));
|
$libs = clean_spaces(implode(' ', $libs));
|
||||||
@@ -133,18 +100,18 @@ trait postgresql
|
|||||||
}
|
}
|
||||||
|
|
||||||
$shell
|
$shell
|
||||||
->exec($envs . ' make -C src/bin/pg_config install')
|
->exec('make -C src/bin/pg_config install')
|
||||||
->exec($envs . ' make -C src/include install')
|
->exec('make -C src/include install')
|
||||||
->exec($envs . ' make -C src/common install')
|
->exec('make -C src/common install')
|
||||||
->exec($envs . ' make -C src/port install')
|
->exec('make -C src/port install')
|
||||||
->exec($envs . ' make -C src/interfaces/libpq install');
|
->exec('make -C src/interfaces/libpq install');
|
||||||
|
|
||||||
// remove dynamic libs
|
// remove dynamic libs
|
||||||
shell()->cd($this->source_dir . '/build')
|
shell()->cd($this->source_dir . '/build')
|
||||||
->exec("rm -rf {$builddir}/lib/*.so.*")
|
->exec("rm -rf {$this->getBuildRootPath()}/lib/*.so.*")
|
||||||
->exec("rm -rf {$builddir}/lib/*.so")
|
->exec("rm -rf {$this->getBuildRootPath()}/lib/*.so")
|
||||||
->exec("rm -rf {$builddir}/lib/*.dylib");
|
->exec("rm -rf {$this->getBuildRootPath()}/lib/*.dylib");
|
||||||
|
|
||||||
FileSystem::replaceFileStr(BUILD_LIB_PATH . '/pkgconfig/libpq.pc', '-lldap', '-lldap -llber');
|
FileSystem::replaceFileStr("{$this->getLibDir()}/pkgconfig/libpq.pc", '-lldap', '-lldap -llber');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,21 +21,20 @@ $test_php_version = [
|
|||||||
// 'git',
|
// 'git',
|
||||||
];
|
];
|
||||||
|
|
||||||
// test os (macos-13, macos-14, macos-15, ubuntu-latest, windows-latest are available)
|
// test os (macos-15-intel, macos-15, ubuntu-latest, windows-latest are available)
|
||||||
$test_os = [
|
$test_os = [
|
||||||
// 'macos-13', // bin/spc for x86_64
|
'macos-15-intel', // bin/spc for x86_64
|
||||||
'macos-14', // bin/spc for arm64
|
|
||||||
'macos-15', // bin/spc for arm64
|
'macos-15', // bin/spc for arm64
|
||||||
// 'ubuntu-latest', // bin/spc-alpine-docker for x86_64
|
// 'ubuntu-latest', // bin/spc-alpine-docker for x86_64
|
||||||
'ubuntu-22.04', // bin/spc-gnu-docker for x86_64
|
// 'ubuntu-22.04', // bin/spc-gnu-docker for x86_64
|
||||||
'ubuntu-24.04', // bin/spc for x86_64
|
// 'ubuntu-24.04', // bin/spc for x86_64
|
||||||
'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64
|
// 'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64
|
||||||
'ubuntu-24.04-arm', // bin/spc for arm64
|
// 'ubuntu-24.04-arm', // bin/spc for arm64
|
||||||
// 'windows-latest', // .\bin\spc.ps1
|
// 'windows-latest', // .\bin\spc.ps1
|
||||||
];
|
];
|
||||||
|
|
||||||
// whether enable thread safe
|
// whether enable thread safe
|
||||||
$zts = true;
|
$zts = false;
|
||||||
|
|
||||||
$no_strip = false;
|
$no_strip = false;
|
||||||
|
|
||||||
@@ -50,7 +49,7 @@ $prefer_pre_built = false;
|
|||||||
|
|
||||||
// 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' => 'pgsql',
|
'Linux', 'Darwin' => 'pdo_pgsql',
|
||||||
'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',
|
'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',
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -156,17 +155,13 @@ if ($shared_extensions) {
|
|||||||
switch ($argv[2] ?? null) {
|
switch ($argv[2] ?? null) {
|
||||||
case 'ubuntu-22.04':
|
case 'ubuntu-22.04':
|
||||||
case 'ubuntu-22.04-arm':
|
case 'ubuntu-22.04-arm':
|
||||||
|
case 'macos-15':
|
||||||
|
case 'macos-15-intel':
|
||||||
$shared_cmd = ' --build-shared=' . quote2($shared_extensions) . ' ';
|
$shared_cmd = ' --build-shared=' . quote2($shared_extensions) . ' ';
|
||||||
break;
|
break;
|
||||||
case 'ubuntu-24.04':
|
case 'ubuntu-24.04':
|
||||||
case 'ubuntu-24.04-arm':
|
case 'ubuntu-24.04-arm':
|
||||||
break;
|
break;
|
||||||
case 'macos-13':
|
|
||||||
case 'macos-14':
|
|
||||||
case 'macos-15':
|
|
||||||
$shared_cmd = ' --build-shared=' . quote2($shared_extensions) . ' ';
|
|
||||||
$no_strip = true;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
$shared_cmd = '';
|
$shared_cmd = '';
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user