mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
Add ext-excimer (closes #1019)
This commit is contained in:
parent
a678d908d5
commit
552a8a1ea2
9
config/pkg/ext/ext-excimer.yml
Normal file
9
config/pkg/ext/ext-excimer.yml
Normal file
@ -0,0 +1,9 @@
|
||||
ext-excimer:
|
||||
type: php-extension
|
||||
artifact:
|
||||
source:
|
||||
type: pecl
|
||||
name: excimer
|
||||
metadata:
|
||||
license-files: [LICENSE]
|
||||
license: PHP-3.01
|
||||
19
src/Package/Extension/excimer.php
Normal file
19
src/Package/Extension/excimer.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Package\Extension;
|
||||
|
||||
use StaticPHP\Attribute\Package\Extension;
|
||||
use StaticPHP\Package\PhpExtensionPackage;
|
||||
|
||||
#[Extension('excimer')]
|
||||
class excimer extends PhpExtensionPackage
|
||||
{
|
||||
public function getSharedExtensionEnv(): array
|
||||
{
|
||||
$env = parent::getSharedExtensionEnv();
|
||||
$env['LIBS'] = clean_spaces(str_replace('-lphp', '', $env['LIBS']));
|
||||
return $env;
|
||||
}
|
||||
}
|
||||
@ -74,11 +74,7 @@ abstract class UnixUtil
|
||||
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 (ApplicationContext::get(ToolchainInterface::class) instanceof ZigToolchain) {
|
||||
return '-Wl,--export-dynamic';
|
||||
}
|
||||
// macOS
|
||||
if (SystemTarget::getTargetOS() !== 'Linux') {
|
||||
if (SystemTarget::getTargetOS() !== 'Linux' || ApplicationContext::get(ToolchainInterface::class) instanceof ZigToolchain) {
|
||||
return "-Wl,-exported_symbols_list,{$symbol_file}";
|
||||
}
|
||||
return "-Wl,--dynamic-list={$symbol_file}";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user