mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
don't add -lomp on macos (not required)
This commit is contained in:
parent
d322be1666
commit
518ed3a7fd
@ -12,15 +12,14 @@ class imagick extends Extension
|
||||
{
|
||||
public function patchBeforeMake(): bool
|
||||
{
|
||||
if (PHP_OS_FAMILY !== 'Linux') {
|
||||
return false;
|
||||
}
|
||||
if (getenv('SPC_LIBC') === 'glibc' && str_contains(getenv('CC'), 'devtoolset-10')) {
|
||||
return false;
|
||||
}
|
||||
// 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 => ''
|
||||
};
|
||||
// imagick with calls omp_pause_all, which requires openmp, on non-musl we build imagick without openmp
|
||||
$extra_libs = trim(getenv('SPC_EXTRA_LIBS') . ' -lgomp');
|
||||
f_putenv('SPC_EXTRA_LIBS=' . $extra_libs);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -146,9 +146,6 @@ class SPCConfigUtil
|
||||
if (in_array('imagemagick', $libraries) && PHP_OS_FAMILY === 'Linux' && !(getenv('SPC_LIBC') === 'glibc' && str_contains(getenv('CC'), 'devtoolset-10'))) {
|
||||
$short_name[] = '-lgomp';
|
||||
}
|
||||
if (in_array('imagemagick', $libraries) && PHP_OS_FAMILY === 'Darwin') {
|
||||
$short_name[] = '-lomp';
|
||||
}
|
||||
return implode(' ', $short_name);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user