mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-08 17:35:36 +08:00
build_lib_path is better
This commit is contained in:
@@ -340,7 +340,7 @@ class LinuxBuilder extends UnixBuilderBase
|
|||||||
chdir($cwd);
|
chdir($cwd);
|
||||||
}
|
}
|
||||||
if (!$this->getOption('no-strip', false) && file_exists(BUILD_LIB_PATH . '/' . $realLibName)) {
|
if (!$this->getOption('no-strip', false) && file_exists(BUILD_LIB_PATH . '/' . $realLibName)) {
|
||||||
shell()->cd(BUILD_LIB_PATH)->exec("strip --strip-all $realLibName");
|
shell()->cd(BUILD_LIB_PATH)->exec("strip --strip-all {$realLibName}");
|
||||||
}
|
}
|
||||||
$this->patchPhpScripts();
|
$this->patchPhpScripts();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -207,8 +207,8 @@ abstract class UnixBuilderBase extends BuilderBase
|
|||||||
}
|
}
|
||||||
// if someone changed to EMBED_TYPE=shared, we need to add LD_LIBRARY_PATH
|
// if someone changed to EMBED_TYPE=shared, we need to add LD_LIBRARY_PATH
|
||||||
if (getenv('SPC_CMD_VAR_PHP_EMBED_TYPE') === 'shared') {
|
if (getenv('SPC_CMD_VAR_PHP_EMBED_TYPE') === 'shared') {
|
||||||
$ext_path = 'LD_LIBRARY_PATH=' . BUILD_ROOT_PATH . '/lib:$LD_LIBRARY_PATH ';
|
$ext_path = 'LD_LIBRARY_PATH=' . BUILD_LIB_PATH . ':$LD_LIBRARY_PATH ';
|
||||||
FileSystem::removeFileIfExists(BUILD_ROOT_PATH . '/lib/libphp.a');
|
FileSystem::removeFileIfExists(BUILD_LIB_PATH . '/libphp.a');
|
||||||
} else {
|
} else {
|
||||||
$ext_path = '';
|
$ext_path = '';
|
||||||
foreach (glob(BUILD_LIB_PATH . '/libphp*.so') as $file) {
|
foreach (glob(BUILD_LIB_PATH . '/libphp*.so') as $file) {
|
||||||
|
|||||||
Reference in New Issue
Block a user