Skip to content

Commit 8028987

Browse files
authored
macOS don't need to disable avx2 explictly
1 parent 18c5ccf commit 8028987

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SPC/builder/unix/library/libwebp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ protected function build(): void
1313
$code = 'int main() { return _mm256_cvtsi256_si32(_mm256_setzero_si256()); }';
1414
$cc = getenv('CC') ?: 'gcc';
1515
[$ret] = shell()->execWithResult("echo '{$code}' | {$cc} -x c -mavx2 -o /dev/null - 2>&1");
16-
$disableAvx2 = $ret !== 0 && GNU_ARCH === 'x86_64';
16+
$disableAvx2 = $ret !== 0 && GNU_ARCH === 'x86_64' && PHP_OS_FAMILY === 'Linux';
1717

1818
UnixCMakeExecutor::create($this)
1919
->addConfigureArgs(

0 commit comments

Comments
 (0)