Add --no-php option to spc-config

This commit is contained in:
crazywhalecc 2025-07-22 17:26:34 +08:00
parent c8eb62e8f0
commit 95a94da66f
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680

View File

@ -23,6 +23,7 @@ class SPCConfigCommand extends BaseCommand
$this->addOption('with-suggested-exts', 'E', null, 'Build with suggested extensions for selected exts');
$this->addOption('includes', null, null, 'Add additional include path');
$this->addOption('libs', null, null, 'Add additional libs path');
$this->addOption('no-php', null, null, 'Do not link to PHP library');
}
/**
@ -37,7 +38,7 @@ class SPCConfigCommand extends BaseCommand
$include_suggest_ext = $this->getOption('with-suggested-exts');
$include_suggest_lib = $this->getOption('with-suggested-libs');
$util = new SPCConfigUtil();
$util = new SPCConfigUtil(link_php: !$this->getOption('no-php'));
$config = $util->config($extensions, $libraries, $include_suggest_ext, $include_suggest_lib);
if ($this->getOption('includes')) {