get rid of extra logic for shared and static libraries, rely on SPCConfigUtil

This commit is contained in:
DubbleClick
2025-07-24 21:42:31 +07:00
parent dd99f258c1
commit eca7a43a01
4 changed files with 10 additions and 55 deletions

View File

@@ -6,7 +6,6 @@ namespace SPC\builder\extension;
use SPC\builder\Extension;
use SPC\util\CustomExt;
use SPC\util\SPCTarget;
#[CustomExt('imagick')]
class imagick extends Extension
@@ -16,14 +15,4 @@ class imagick extends Extension
$disable_omp = ' ac_cv_func_omp_pause_resource_all=no';
return '--with-imagick=' . ($shared ? 'shared,' : '') . BUILD_ROOT_PATH . $disable_omp;
}
protected function getStaticAndSharedLibs(): array
{
[$static, $shared] = parent::getStaticAndSharedLibs();
if (SPCTarget::getLibc() === 'glibc' && version_compare(SPCTarget::getLibcVersion(), '2.17', '<=')) {
$static .= ' -lstdc++';
$shared = str_replace('-lstdc++', '', $shared);
}
return [$static, $shared];
}
}