Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/SPC/builder/extension/memcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,9 @@ public function patchBeforeBuildconf(): bool
);
return true;
}

protected function getExtraEnv(): array
{
return ['CFLAGS' => '-std=c17'];
}
}
8 changes: 6 additions & 2 deletions src/SPC/builder/unix/library/libwebp.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
namespace SPC\builder\unix\library;

use SPC\util\executor\UnixCMakeExecutor;
use SPC\util\SPCTarget;

trait libwebp
{
protected function build(): void
{
$code = 'int main() { return _mm256_cvtsi256_si32(_mm256_setzero_si256()); }';
$cc = getenv('CC') ?: 'gcc';
[$ret] = shell()->execWithResult("echo '{$code}' | {$cc} -x c -mavx2 -o /dev/null - 2>&1");
$disableAvx2 = $ret !== 0 && GNU_ARCH === 'x86_64';

UnixCMakeExecutor::create($this)
->addConfigureArgs(
'-DWEBP_BUILD_EXTRAS=OFF',
Expand All @@ -23,7 +27,7 @@ protected function build(): void
'-DWEBP_BUILD_WEBPINFO=OFF',
'-DWEBP_BUILD_WEBPMUX=OFF',
'-DWEBP_BUILD_FUZZTEST=OFF',
SPCTarget::getLibcVersion() === '2.31' && GNU_ARCH === 'x86_64' ? '-DWEBP_ENABLE_SIMD=OFF' : '' // fix an edge bug for debian 11 with gcc 10
$disableAvx2 ? '-DWEBP_ENABLE_SIMD=OFF' : ''
)
->build();
// patch pkgconfig
Expand Down
14 changes: 7 additions & 7 deletions src/globals/test-extensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
// '8.1',
// '8.2',
// '8.3',
'8.4',
// '8.4',
'8.5',
// 'git',
];

// test os (macos-15-intel, macos-15, ubuntu-latest, windows-latest are available)
$test_os = [
'macos-15-intel', // bin/spc for x86_64
'macos-15', // bin/spc for arm64
// 'macos-15-intel', // bin/spc for x86_64
// 'macos-15', // bin/spc for arm64
// 'ubuntu-latest', // bin/spc-alpine-docker for x86_64
'ubuntu-22.04', // bin/spc-gnu-docker for x86_64
// 'ubuntu-24.04', // bin/spc for x86_64
// 'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64
'ubuntu-24.04', // bin/spc for x86_64
'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64
'ubuntu-24.04-arm', // bin/spc for arm64
// 'windows-2022', // .\bin\spc.ps1
// 'windows-2025',
Expand All @@ -50,7 +50,7 @@

// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
$extensions = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => 'bcmath,xsl,xml',
'Linux', 'Darwin' => 'imagick',
'Windows' => 'bcmath',
};

Expand All @@ -66,7 +66,7 @@

// If you want to test extra libs for extensions, add them below (comma separated, example `libwebp,libavif`). Unnecessary, when $with_suggested_libs is true.
$with_libs = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => '',
'Linux', 'Darwin' => 'libwebp',
'Windows' => '',
};

Expand Down