Skip to content

Commit 08388c0

Browse files
committed
force enable tailcall vm with zig
1 parent e7a88f1 commit 08388c0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/SPC/toolchain/ZigToolchain.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ public function afterInit(): void
6565
GlobalEnvManager::putenv("SPC_EXTRA_LIBS={$extra_libs}");
6666
}
6767
$cflags = getenv('SPC_DEFAULT_C_FLAGS') ?: getenv('CFLAGS') ?: '';
68+
GlobalEnvManager::putenv('SPC_EXTRA_PHP_VARS=php_cv_preserve_none=yes');
6869
$has_avx512 = str_contains($cflags, '-mavx512') || str_contains($cflags, '-march=x86-64-v4');
6970
if (!$has_avx512) {
70-
GlobalEnvManager::putenv('SPC_EXTRA_PHP_VARS=php_cv_have_avx512=no php_cv_have_avx512vbmi=no');
71+
$extra_vars = getenv('SPC_EXTRA_PHP_VARS') ?: '';
72+
GlobalEnvManager::putenv("SPC_EXTRA_PHP_VARS=php_cv_have_avx512=no php_cv_have_avx512vbmi=no {$extra_vars}");
7173
}
7274
}
7375

0 commit comments

Comments
 (0)