mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
fix xz shared build
This commit is contained in:
parent
fa670cce4a
commit
17d699d4a5
@ -10,7 +10,14 @@ trait xz
|
|||||||
{
|
{
|
||||||
public function build(): void
|
public function build(): void
|
||||||
{
|
{
|
||||||
UnixAutoconfExecutor::create($this)
|
$make = UnixAutoconfExecutor::create($this);
|
||||||
|
if (!getenv('SPC_LINK_STATIC')) {
|
||||||
|
// liblzma can only build one of static or shared at a time
|
||||||
|
$make
|
||||||
|
->removeConfigureArgs('--enable-static')
|
||||||
|
->addConfigureArgs('--disable-static');
|
||||||
|
}
|
||||||
|
$make
|
||||||
->configure(
|
->configure(
|
||||||
'--disable-scripts',
|
'--disable-scripts',
|
||||||
'--disable-doc',
|
'--disable-doc',
|
||||||
|
|||||||
@ -283,7 +283,7 @@ class SPCConfigUtil
|
|||||||
$libs = array_reverse(Config::getLib($library, 'static-libs', []));
|
$libs = array_reverse(Config::getLib($library, 'static-libs', []));
|
||||||
foreach ($libs as $lib) {
|
foreach ($libs as $lib) {
|
||||||
// check file existence
|
// check file existence
|
||||||
if (!file_exists(BUILD_LIB_PATH . "/{$lib}")) {
|
if (!file_exists(BUILD_LIB_PATH . "/{$lib}") && getenv('SPC_LINK_STATIC')) {
|
||||||
throw new WrongUsageException("Library file '{$lib}' for lib [{$library}] does not exist in '" . BUILD_LIB_PATH . "'. Please build it first.");
|
throw new WrongUsageException("Library file '{$lib}' for lib [{$library}] does not exist in '" . BUILD_LIB_PATH . "'. Please build it first.");
|
||||||
}
|
}
|
||||||
$lib_names[] = $this->getShortLibName($lib);
|
$lib_names[] = $this->getShortLibName($lib);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user