mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
add release thing to extension build too
This commit is contained in:
parent
6bbb3c969c
commit
f8b0c2c980
@ -546,6 +546,7 @@ class Extension
|
||||
'CFLAGS' => $config['cflags'],
|
||||
'CXXFLAGS' => $config['cflags'],
|
||||
'LDFLAGS' => $config['ldflags'],
|
||||
'EXTRA_LDFLAGS' => getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS'),
|
||||
'LIBS' => clean_spaces("{$preStatic} {$staticLibs} {$postStatic} {$sharedLibs}"),
|
||||
'LD_LIBRARY_PATH' => BUILD_LIB_PATH,
|
||||
];
|
||||
|
||||
@ -283,9 +283,14 @@ class LinuxBuilder extends UnixBuilderBase
|
||||
|
||||
// process libphp.so for shared embed
|
||||
$libphpSo = BUILD_LIB_PATH . '/libphp.so';
|
||||
$libphpSoDest = BUILD_LIB_PATH . '/libphp.so';
|
||||
if (file_exists($libphpSo)) {
|
||||
// deploy libphp.so
|
||||
$this->deployBinary($libphpSo, $libphpSo, false);
|
||||
preg_match('/-release\s+(\S*)/', getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS'), $matches);
|
||||
if (!empty($matches[1])) {
|
||||
$libphpSoDest = str_replace('.so', '-' . $matches[1] . '.so', $libphpSo);
|
||||
}
|
||||
$this->deployBinary($libphpSo, $libphpSoDest, false);
|
||||
}
|
||||
|
||||
// process shared extensions build-with-php
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user