mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 21:04:52 +08:00
Merge pull request #857 from crazywhalecc/fix/lstdcpp
move -lstdc++ to the end of the libraries
This commit is contained in:
commit
6b5aaa38ae
@ -16,9 +16,11 @@ class redis extends Extension
|
|||||||
if ($this->isBuildStatic()) {
|
if ($this->isBuildStatic()) {
|
||||||
$arg .= $this->builder->getExt('session')?->isBuildStatic() ? ' --enable-redis-session' : ' --disable-redis-session';
|
$arg .= $this->builder->getExt('session')?->isBuildStatic() ? ' --enable-redis-session' : ' --disable-redis-session';
|
||||||
$arg .= $this->builder->getExt('igbinary')?->isBuildStatic() ? ' --enable-redis-igbinary' : ' --disable-redis-igbinary';
|
$arg .= $this->builder->getExt('igbinary')?->isBuildStatic() ? ' --enable-redis-igbinary' : ' --disable-redis-igbinary';
|
||||||
|
$arg .= $this->builder->getExt('msgpack')?->isBuildStatic() ? ' --enable-redis-msgpack' : ' --disable-redis-msgpack';
|
||||||
} else {
|
} else {
|
||||||
$arg .= $this->builder->getExt('session') ? ' --enable-redis-session' : ' --disable-redis-session';
|
$arg .= $this->builder->getExt('session') ? ' --enable-redis-session' : ' --disable-redis-session';
|
||||||
$arg .= $this->builder->getExt('igbinary') ? ' --enable-redis-igbinary' : ' --disable-redis-igbinary';
|
$arg .= $this->builder->getExt('igbinary') ? ' --enable-redis-igbinary' : ' --disable-redis-igbinary';
|
||||||
|
$arg .= $this->builder->getExt('msgpack') ? ' --enable-redis-msgpack' : ' --disable-redis-msgpack';
|
||||||
}
|
}
|
||||||
if ($this->builder->getLib('zstd')) {
|
if ($this->builder->getLib('zstd')) {
|
||||||
$arg .= ' --enable-redis-zstd --with-libzstd="' . BUILD_ROOT_PATH . '"';
|
$arg .= ' --enable-redis-zstd --with-libzstd="' . BUILD_ROOT_PATH . '"';
|
||||||
|
|||||||
@ -80,9 +80,7 @@ class SPCConfigUtil
|
|||||||
}
|
}
|
||||||
if ($this->builder->hasCpp()) {
|
if ($this->builder->hasCpp()) {
|
||||||
$libcpp = SPCTarget::getTargetOS() === 'Darwin' ? '-lc++' : '-lstdc++';
|
$libcpp = SPCTarget::getTargetOS() === 'Darwin' ? '-lc++' : '-lstdc++';
|
||||||
if (!str_contains($libs, $libcpp)) {
|
$libs = str_replace($libcpp, '', $libs) . " {$libcpp}";
|
||||||
$libs .= " {$libcpp}";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->libs_only_deps) {
|
if ($this->libs_only_deps) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user