Skip to content

Commit 31a4498

Browse files
committed
bring back simdjson tests, extension headers do not properly guard for avx512 symbols
1 parent 044275d commit 31a4498

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

src/SPC/builder/extension/simdjson.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
use SPC\builder\Extension;
88
use SPC\store\FileSystem;
9+
use SPC\toolchain\ToolchainManager;
10+
use SPC\toolchain\ZigToolchain;
911
use SPC\util\CustomExt;
1012

1113
#[CustomExt('simdjson')]
@@ -31,4 +33,18 @@ public function patchBeforeBuildconf(): bool
3133
);
3234
return true;
3335
}
36+
37+
public function getSharedExtensionEnv(): array
38+
{
39+
$env = parent::getSharedExtensionEnv();
40+
if (ToolchainManager::getToolchainClass() === ZigToolchain::class) {
41+
$extra = getenv('SPC_COMPILER_EXTRA');
42+
if (!str_contains((string) $extra, '-lstdc++')) {
43+
f_putenv('SPC_COMPILER_EXTRA=' . clean_spaces($extra . ' -lstdc++'));
44+
}
45+
$env['CFLAGS'] .= ' -Xclang -target-feature -Xclang +evex512';
46+
$env['CXXFLAGS'] .= ' -Xclang -target-feature -Xclang +evex512';
47+
}
48+
return $env;
49+
}
3450
}

src/globals/test-extensions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323

2424
// test os (macos-13, macos-14, macos-15, ubuntu-latest, windows-latest are available)
2525
$test_os = [
26-
'macos-13', // bin/spc for x86_64
27-
// 'macos-14', // bin/spc for arm64
26+
// 'macos-13', // bin/spc for x86_64
27+
'macos-14', // bin/spc for arm64
2828
'macos-15', // bin/spc for arm64
2929
// 'ubuntu-latest', // bin/spc-alpine-docker for x86_64
3030
'ubuntu-22.04', // bin/spc-gnu-docker for x86_64

0 commit comments

Comments
 (0)