move -lstdc++ to the end of the libraries

This commit is contained in:
DubbleClick 2025-08-19 10:27:52 +07:00
parent cbddb2652d
commit d48c84d81b

View File

@ -80,9 +80,7 @@ class SPCConfigUtil
}
if ($this->builder->hasCpp()) {
$libcpp = SPCTarget::getTargetOS() === 'Darwin' ? '-lc++' : '-lstdc++';
if (!str_contains($libs, $libcpp)) {
$libs .= " {$libcpp}";
}
$libs = str_replace($libcpp, '', $libs) . " {$libcpp}";
}
if ($this->libs_only_deps) {