mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-04 15:25:41 +08:00
Merge branch 'main' into ext/gettext
# Conflicts: # config/ext.json # src/globals/test-extensions.php
This commit is contained in:
@@ -23,11 +23,11 @@ class BuildCliCommand extends BuildCommand
|
||||
{
|
||||
$this->addArgument('extensions', InputArgument::REQUIRED, 'The extensions will be compiled, comma separated');
|
||||
$this->addOption('with-libs', null, InputOption::VALUE_REQUIRED, 'add additional libraries, comma separated', '');
|
||||
$this->addOption('build-micro', null, null, 'build micro');
|
||||
$this->addOption('build-cli', null, null, 'build cli');
|
||||
$this->addOption('build-fpm', null, null, 'build fpm');
|
||||
$this->addOption('build-embed', null, null, 'build embed');
|
||||
$this->addOption('build-all', null, null, 'build cli, micro, fpm, embed');
|
||||
$this->addOption('build-micro', null, null, 'Build micro SAPI');
|
||||
$this->addOption('build-cli', null, null, 'Build cli SAPI');
|
||||
$this->addOption('build-fpm', null, null, 'Build fpm SAPI');
|
||||
$this->addOption('build-embed', null, null, 'Build embed SAPI');
|
||||
$this->addOption('build-all', null, null, 'Build all SAPI');
|
||||
$this->addOption('no-strip', null, null, 'build without strip, in order to debug and load external extensions');
|
||||
$this->addOption('enable-zts', null, null, 'enable ZTS support');
|
||||
$this->addOption('disable-opcache-jit', null, null, 'disable opcache jit');
|
||||
@@ -61,8 +61,9 @@ class BuildCliCommand extends BuildCommand
|
||||
try {
|
||||
// create builder
|
||||
$builder = BuilderProvider::makeBuilderByInput($this->input);
|
||||
// calculate dependencies
|
||||
[$extensions, $libraries, $not_included] = DependencyUtil::getExtLibsByDeps($extensions, $libraries);
|
||||
$include_suggest_ext = $this->getOption('with-suggested-exts');
|
||||
$include_suggest_lib = $this->getOption('with-suggested-libs');
|
||||
[$extensions, $libraries, $not_included] = DependencyUtil::getExtsAndLibs($extensions, $libraries, $include_suggest_ext, $include_suggest_lib);
|
||||
|
||||
// print info
|
||||
$indent_texts = [
|
||||
@@ -76,12 +77,23 @@ class BuildCliCommand extends BuildCommand
|
||||
if (!empty($this->input->getOption('with-hardcoded-ini'))) {
|
||||
$indent_texts['Hardcoded INI'] = $this->input->getOption('with-hardcoded-ini');
|
||||
}
|
||||
$this->printFormatInfo($indent_texts);
|
||||
if ($this->input->getOption('disable-opcache-jit')) {
|
||||
$indent_texts['Opcache JIT'] = 'disabled';
|
||||
}
|
||||
try {
|
||||
$ver = $builder->getPHPVersion();
|
||||
$indent_texts['PHP Version'] = $ver;
|
||||
} catch (\Throwable) {
|
||||
if (($ver = $builder->getPHPVersionFromArchive()) !== false) {
|
||||
$indent_texts['PHP Version'] = $ver;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($not_included)) {
|
||||
logger()->warning('Some extensions will be enabled due to dependencies: ' . implode(',', $not_included));
|
||||
$indent_texts['Extra Exts (' . count($not_included) . ')'] = implode(', ', $not_included);
|
||||
}
|
||||
logger()->info('Build will start after 2s ...');
|
||||
$this->printFormatInfo($indent_texts);
|
||||
logger()->notice('Build will start after 2s ...');
|
||||
sleep(2);
|
||||
|
||||
if ($this->input->getOption('with-clean')) {
|
||||
|
||||
Reference in New Issue
Block a user