oh dear god what am I doing

This commit is contained in:
DubbleClick 2025-07-25 11:12:49 +07:00
parent 0acf238c74
commit 029f2db620

View File

@ -228,7 +228,7 @@ class Extension
*/ */
public function patchBeforeSharedMake(): bool public function patchBeforeSharedMake(): bool
{ {
$config = (new SPCConfigUtil($this->builder))->config([$this->getName()], $this->builder->getOption('with-suggested-exts'), $this->builder->getOption('with-suggested-libs')); $config = (new SPCConfigUtil($this->builder))->config([$this->getName()], array_map(fn ($l) => $l->getName(), $this->builder->getLibs()));
[$staticLibs] = $this->getStaticAndSharedLibs($config['libs']); [$staticLibs] = $this->getStaticAndSharedLibs($config['libs']);
FileSystem::replaceFileRegex( FileSystem::replaceFileRegex(
$this->source_dir . '/Makefile', $this->source_dir . '/Makefile',
@ -407,7 +407,7 @@ class Extension
*/ */
public function buildUnixShared(): void public function buildUnixShared(): void
{ {
$config = (new SPCConfigUtil($this->builder))->config([$this->getName()], $this->builder->getOption('with-suggested-exts'), $this->builder->getOption('with-suggested-libs')); $config = (new SPCConfigUtil($this->builder))->config([$this->getName()], array_map(fn ($l) => $l->getName(), $this->builder->getLibs()));
[$staticLibs, $sharedLibs] = $this->getStaticAndSharedLibs($config['libs']); [$staticLibs, $sharedLibs] = $this->getStaticAndSharedLibs($config['libs']);
$env = [ $env = [
'CFLAGS' => $config['cflags'], 'CFLAGS' => $config['cflags'],