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

@@ -86,7 +86,13 @@ class SPCConfigUtil
$libs .= " {$this->getFrameworksString($extensions)}";
}
if ($this->builder->hasCpp()) {
$libs .= SPCTarget::getTargetOS() === 'Darwin' ? ' -lc++' : ' -lstdc++';
$libcpp = SPCTarget::getTargetOS() === 'Darwin' ? '-lc++' : '-lstdc++';
if (!str_contains($libs, $libcpp)) {
$libs .= " {$libcpp}";
}
if (str_contains(getenv('OATH'), 'rh/devtoolset-10')) {
str_replace('-lstdc++', '-l:stdc++.a', $libs);
}
}
if ($this->libs_only_deps) {