mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
simdjson needs patch
This commit is contained in:
parent
93e6dcab1d
commit
21149f6807
@ -38,6 +38,10 @@ class simdjson extends Extension
|
||||
{
|
||||
$env = parent::getSharedExtensionEnv();
|
||||
if (ToolchainManager::getToolchainClass() === ZigToolchain::class) {
|
||||
$extra = getenv('SPC_COMPILER_EXTRA');
|
||||
if (!str_contains((string) $extra, '-lstdc++')) {
|
||||
f_putenv('SPC_COMPILER_EXTRA=' . clean_spaces($extra . ' -lstdc++'));
|
||||
}
|
||||
$env['CFLAGS'] .= ' -Xclang -target-feature -Xclang +evex512';
|
||||
$env['CXXFLAGS'] .= ' -Xclang -target-feature -Xclang +evex512';
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ class SPCConfigUtil
|
||||
if (SPCTarget::getTargetOS() === 'Darwin') {
|
||||
$libs .= " {$this->getFrameworksString($extensions)}";
|
||||
}
|
||||
if ($this->builder->hasCpp()) {
|
||||
if ($this->builder->hasCpp() || collect($extensions)->contains(static fn (string $ext) => Config::getExt($ext)['cpp-extension'] ?? false)) {
|
||||
$libcpp = SPCTarget::getTargetOS() === 'Darwin' ? '-lc++' : '-lstdc++';
|
||||
$libs = str_replace($libcpp, '', $libs) . " {$libcpp}";
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user