-lomp on macos

This commit is contained in:
DubbleClick
2025-06-11 15:01:16 +07:00
parent a7771e95f2
commit a503aaa8a0
3 changed files with 10 additions and 3 deletions

View File

@@ -15,8 +15,12 @@ class imagick extends Extension
if (getenv('SPC_LIBC') === 'glibc' && str_contains(getenv('CC'), 'devtoolset-10')) {
return false;
}
// imagick with calls omp_pause_all which requires -lgomp, on non-musl we build imagick without openmp
$extra_libs = trim(getenv('SPC_EXTRA_LIBS') . ' -lgomp');
// imagick with calls omp_pause_all which requires openmp, on non-musl we build imagick without openmp
$extra_libs = match (PHP_OS_FAMILY) {
'Linux' => trim(getenv('SPC_EXTRA_LIBS') . ' -lgomp'),
'Darwin' => trim(getenv('SPC_EXTRA_LIBS') . ' -lomp'),
default => ''
};
f_putenv('SPC_EXTRA_LIBS=' . $extra_libs);
return true;
}