We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e051c8 commit e1a14bbCopy full SHA for e1a14bb
src/SPC/builder/unix/library/libwebp.php
@@ -10,9 +10,10 @@ trait libwebp
10
{
11
protected function build(): void
12
13
- $code = 'int main() { return _mm256_cvtsi256_si32(_mm256_setzero_si256()); }';
+ $code = '#include <immintrin.h>
14
+int main() { return _mm256_cvtsi256_si32(_mm256_setzero_si256()); }';
15
$cc = getenv('CC') ?: 'gcc';
- [$ret] = shell()->execWithResult("echo '{$code}' | {$cc} -x c -mavx2 -o /dev/null - 2>&1");
16
+ [$ret] = shell()->execWithResult("printf '%s' '{$code}' | {$cc} -x c -mavx2 -o /dev/null - 2>&1");
17
$disableAvx2 = $ret !== 0 && GNU_ARCH === 'x86_64' && PHP_OS_FAMILY === 'Linux';
18
19
UnixCMakeExecutor::create($this)
0 commit comments