Skip to content

Commit d48c84d

Browse files
committed
move -lstdc++ to the end of the libraries
1 parent cbddb26 commit d48c84d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/SPC/util/SPCConfigUtil.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ public function config(array $extensions = [], array $libraries = [], bool $incl
8080
}
8181
if ($this->builder->hasCpp()) {
8282
$libcpp = SPCTarget::getTargetOS() === 'Darwin' ? '-lc++' : '-lstdc++';
83-
if (!str_contains($libs, $libcpp)) {
84-
$libs .= " {$libcpp}";
85-
}
83+
$libs = str_replace($libcpp, '', $libs) . " {$libcpp}";
8684
}
8785

8886
if ($this->libs_only_deps) {

0 commit comments

Comments
 (0)