build_lib_path is better

This commit is contained in:
DubbleClick
2025-06-27 22:53:04 +07:00
parent b6240f16fb
commit 4c8a173213
2 changed files with 3 additions and 3 deletions

View File

@@ -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();
} }

View File

@@ -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) {