mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 00:35:41 +08:00
add liburing for swoole
This commit is contained in:
@@ -61,7 +61,7 @@ class swoole extends Extension
|
||||
}
|
||||
$arg .= $this->builder->getLib('nghttp2') ? (' --with-nghttp2-dir=' . BUILD_ROOT_PATH) : '';
|
||||
$arg .= $this->builder->getLib('zstd') ? ' --enable-zstd' : '';
|
||||
$arg .= $this->builder->getLib('iouring') ? ' --enable-iouring' : '';
|
||||
$arg .= $this->builder->getLib('liburing') ? ' --enable-iouring' : '';
|
||||
$arg .= $this->builder->getExt('sockets') ? ' --enable-sockets' : '';
|
||||
|
||||
// additional feature: swoole-pgsql, it should depend on lib [postgresql], but it will lack of CFLAGS etc.
|
||||
|
||||
32
src/SPC/builder/linux/library/liburing.php
Normal file
32
src/SPC/builder/linux/library/liburing.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\linux\library;
|
||||
|
||||
use SPC\util\executor\UnixAutoconfExecutor;
|
||||
|
||||
class liburing extends LinuxLibraryBase
|
||||
{
|
||||
public const NAME = 'liburing';
|
||||
|
||||
protected function build(): void
|
||||
{
|
||||
// Build liburing with static linking via autoconf
|
||||
UnixAutoconfExecutor::create($this)
|
||||
->removeConfigureArgs(
|
||||
'--disable-shared',
|
||||
'--enable-static',
|
||||
'--with-pic',
|
||||
'--enable-pic',
|
||||
)
|
||||
->addConfigureArgs(
|
||||
'--use-libc'
|
||||
)
|
||||
->configure()
|
||||
->make(with_clean: false)
|
||||
->exec("rm -rf {$this->getLibDir()}/*.so*");
|
||||
|
||||
$this->patchPkgconfPrefix(['liburing.pc', 'liburing-ffi.pc']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user