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
8 changes: 8 additions & 0 deletions config/ext.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@
"sockets"
]
},
"excimer": {
"support": {
"Windows": "wip",
"BSD": "wip"
},
"type": "external",
"source": "ext-excimer"
},
"exif": {
"type": "builtin"
},
Expand Down
12 changes: 11 additions & 1 deletion config/source.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,23 @@
},
"ext-event": {
"type": "url",
"url": "https://bitbucket.org/osmanov/pecl-event/get/3.0.8.tar.gz",
"url": "https://bitbucket.org/osmanov/pecl-event/get/3.1.4.tar.gz",
"path": "php-src/ext/event",
"license": {
"type": "file",
"path": "LICENSE"
}
},
"ext-excimer": {
"type": "url",
"url": "https://pecl.php.net/get/excimer",
"path": "php-src/ext/excimer",
"filename": "excimer.tgz",
"license": {
"type": "file",
"path": "LICENSE"
}
},
"ext-glfw": {
"type": "git",
"url": "https://github.com/mario-deluna/php-glfw",
Expand Down
19 changes: 19 additions & 0 deletions src/SPC/builder/extension/excimer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

declare(strict_types=1);

namespace SPC\builder\extension;

use SPC\builder\Extension;
use SPC\util\CustomExt;

#[CustomExt('excimer')]
class excimer extends Extension
{
public function getSharedExtensionEnv(): array
{
$env = parent::getSharedExtensionEnv();
$env['LIBS'] = clean_spaces(str_replace('-lphp', '', $env['LIBS']));
return $env;
}
}
8 changes: 2 additions & 6 deletions src/SPC/builder/traits/UnixSystemUtilTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,8 @@ public static function getDynamicExportedSymbols(string $lib_file): ?string
if (!is_file($symbol_file)) {
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';
}
// macOS
if (SPCTarget::getTargetOS() !== 'Linux') {
// macOS/zig
if (SPCTarget::getTargetOS() !== 'Linux' || ToolchainManager::getToolchainClass() === ZigToolchain::class) {
return "-Wl,-exported_symbols_list,{$symbol_file}";
}
return "-Wl,--dynamic-list={$symbol_file}";
Expand Down
4 changes: 1 addition & 3 deletions src/SPC/builder/unix/UnixBuilderBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,9 @@ public function deployBinary(string $src, string $dst, bool $executable = true):
throw new SPCInternalException("Deploy failed. Cannot find file after copy: {$dst}");
}

// extract debug info
$this->extractDebugInfo($dst);

// strip
if (!$this->getOption('no-strip')) {
$this->extractDebugInfo($dst);
$this->stripBinary($dst);
}

Expand Down
18 changes: 9 additions & 9 deletions src/globals/test-extensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// test php version (8.1 ~ 8.4 available, multiple for matrix)
$test_php_version = [
'8.1',
// '8.1',
// '8.2',
// '8.3',
'8.4',
Expand All @@ -23,15 +23,15 @@

// 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-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-22.04-arm', // bin/spc-gnu-docker for arm64
// 'ubuntu-24.04-arm', // bin/spc for arm64
// 'windows-2022', // .\bin\spc.ps1
'windows-2025',
// 'windows-2025',
];

// whether enable thread safe
Expand All @@ -50,13 +50,13 @@

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

// If you want to test shared extensions, add them below (comma separated, example `bcmath,openssl`).
$shared_extensions = match (PHP_OS_FAMILY) {
'Linux' => '',
'Linux' => 'excimer',
'Darwin' => '',
'Windows' => '',
};
Expand All @@ -67,7 +67,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' => 'libwebp',
'Windows' => 'nghttp2',
'Windows' => '',
};

// Please change your test base combination. We recommend testing with `common`.
Expand Down
Loading