mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-04 23:35:40 +08:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user