mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
skip php rebuild if we're only building shared libphp.so
This commit is contained in:
parent
bff99fa537
commit
5bd53ed714
@ -106,6 +106,18 @@ class LinuxBuilder extends UnixBuilderBase
|
|||||||
*/
|
*/
|
||||||
public function buildPHP(int $build_target = BUILD_TARGET_NONE): void
|
public function buildPHP(int $build_target = BUILD_TARGET_NONE): void
|
||||||
{
|
{
|
||||||
|
if ($build_target === BUILD_TARGET_EMBED &&
|
||||||
|
file_exists(BUILD_BIN_PATH . '/php-config') &&
|
||||||
|
file_exists(BUILD_BIN_PATH . '/phpize')
|
||||||
|
) {
|
||||||
|
$embed_type = getenv('SPC_CMD_VAR_PHP_EMBED_TYPE') ?: 'static';
|
||||||
|
if ($embed_type === 'shared' && file_exists(BUILD_LIB_PATH . '/libphp.so')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (file_exists(BUILD_LIB_PATH . '/libphp.a')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
// ---------- Update extra-libs ----------
|
// ---------- Update extra-libs ----------
|
||||||
$extra_libs = getenv('SPC_EXTRA_LIBS') ?: '';
|
$extra_libs = getenv('SPC_EXTRA_LIBS') ?: '';
|
||||||
// bloat means force-load all static libraries, even if they are not used
|
// bloat means force-load all static libraries, even if they are not used
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user