mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
fix implicit include
This commit is contained in:
parent
9e051c8c80
commit
e1a14bbb9f
@ -10,9 +10,10 @@ trait libwebp
|
||||
{
|
||||
protected function build(): void
|
||||
{
|
||||
$code = 'int main() { return _mm256_cvtsi256_si32(_mm256_setzero_si256()); }';
|
||||
$code = '#include <immintrin.h>
|
||||
int main() { return _mm256_cvtsi256_si32(_mm256_setzero_si256()); }';
|
||||
$cc = getenv('CC') ?: 'gcc';
|
||||
[$ret] = shell()->execWithResult("echo '{$code}' | {$cc} -x c -mavx2 -o /dev/null - 2>&1");
|
||||
[$ret] = shell()->execWithResult("printf '%s' '{$code}' | {$cc} -x c -mavx2 -o /dev/null - 2>&1");
|
||||
$disableAvx2 = $ret !== 0 && GNU_ARCH === 'x86_64' && PHP_OS_FAMILY === 'Linux';
|
||||
|
||||
UnixCMakeExecutor::create($this)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user