dont fail on -lomp

This commit is contained in:
DubbleClick 2025-06-23 13:23:13 +07:00
parent 864c55feaf
commit f9af24e246

View File

@ -19,7 +19,7 @@ class imagick extends Extension
return false;
}
// imagick with calls omp_pause_all, which requires openmp, on non-musl we build imagick without openmp
$extra_libs = trim(getenv('SPC_EXTRA_LIBS') . ' -L/usr/lib64 -lomp');
$extra_libs = trim(getenv('SPC_EXTRA_LIBS') . ' -lomp');
f_putenv('SPC_EXTRA_LIBS=' . $extra_libs);
return true;
}
@ -38,6 +38,9 @@ class imagick extends Extension
$static .= ' -lstdc++';
$shared = str_replace('-lstdc++', '', $shared);
}
if (str_contains(getenv('CC'), 'zig')) {
$shared = str_replace('-lomp', '/usr/lib64/libomp.so', $shared);
}
return [$static, $shared];
}
}