fix spx shared libadd

This commit is contained in:
henderkes 2026-01-24 20:26:16 +01:00
parent 1c28f0f455
commit 223dd10ac6
3 changed files with 8 additions and 20 deletions

View File

@ -542,7 +542,7 @@ class Extension
*/
protected function getSharedExtensionEnv(): array
{
$config = (new SPCConfigUtil($this->builder))->getExtensionConfig($this);
$config = (new SPCConfigUtil($this->builder, ['no_php' => true]))->getExtensionConfig($this);
[$staticLibs, $sharedLibs] = $this->splitLibsIntoStaticAndShared($config['libs']);
$preStatic = PHP_OS_FAMILY === 'Darwin' ? '' : '-Wl,--start-group ';
$postStatic = PHP_OS_FAMILY === 'Darwin' ? '' : ' -Wl,--end-group ';

View File

@ -1,19 +0,0 @@
<?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;
}
}

View File

@ -45,4 +45,11 @@ class spx extends Extension
FileSystem::copy($this->source_dir . '/src/php_spx.h', $this->source_dir . '/php_spx.h');
return true;
}
public function getSharedExtensionEnv(): array
{
$env = parent::getSharedExtensionEnv();
$env['SPX_SHARED_LIBADD'] = $env['LIBS'];
return $env;
}
}