mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-13 20:05:35 +08:00
Fix embed sanity check on glibc mode
This commit is contained in:
@@ -186,7 +186,7 @@ abstract class UnixBuilderBase extends BuilderBase
|
|||||||
$util = new SPCConfigUtil($this);
|
$util = new SPCConfigUtil($this);
|
||||||
$config = $util->config($this->ext_list, $this->lib_list, $this->getOption('with-suggested-exts'), $this->getOption('with-suggested-libs'));
|
$config = $util->config($this->ext_list, $this->lib_list, $this->getOption('with-suggested-exts'), $this->getOption('with-suggested-libs'));
|
||||||
$lens = "{$config['cflags']} {$config['ldflags']} {$config['libs']}";
|
$lens = "{$config['cflags']} {$config['ldflags']} {$config['libs']}";
|
||||||
if (PHP_OS_FAMILY === 'Linux') {
|
if (PHP_OS_FAMILY === 'Linux' && $this->getOption('libc') !== 'glibc') {
|
||||||
$lens .= ' -static';
|
$lens .= ' -static';
|
||||||
}
|
}
|
||||||
[$ret, $out] = shell()->cd($sample_file_path)->execWithResult(getenv('CC') . ' -o embed embed.c ' . $lens);
|
[$ret, $out] = shell()->cd($sample_file_path)->execWithResult(getenv('CC') . ' -o embed embed.c ' . $lens);
|
||||||
|
|||||||
Reference in New Issue
Block a user