building shared libphp.so on musl is really pointless and should be an error, since static compilations cannot load it

This commit is contained in:
DubbleClick
2025-06-27 22:01:37 +07:00
parent e92f043cfa
commit 43dc04b4d0
2 changed files with 9 additions and 1 deletions

View File

@@ -139,6 +139,9 @@ class LinuxBuilder extends UnixBuilderBase
}
$embed_type = getenv('SPC_CMD_VAR_PHP_EMBED_TYPE') ?: 'static';
if ($embed_type !== 'static' && getenv('SPC_LIBC') === 'musl') {
throw new RuntimeException('Musl libc does not support dynamic linking of PHP embed!');
}
shell()->cd(SOURCE_PATH . '/php-src')
->exec(
getenv('SPC_CMD_PREFIX_PHP_CONFIGURE') . ' ' .
@@ -335,6 +338,9 @@ class LinuxBuilder extends UnixBuilderBase
}
chdir($cwd);
}
if (!$this->getOption('no-strip', false)) {
shell()->cd(SOURCE_PATH . '/php-src/sapi/cli')->exec('strip --strip-all php');
}
$this->patchPhpScripts();
}