From 95a94da66fa0e651a506916a961eb99a145353ce Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 22 Jul 2025 17:26:34 +0800 Subject: [PATCH] Add --no-php option to spc-config --- src/SPC/command/SPCConfigCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SPC/command/SPCConfigCommand.php b/src/SPC/command/SPCConfigCommand.php index a1886ed1..8a54a862 100644 --- a/src/SPC/command/SPCConfigCommand.php +++ b/src/SPC/command/SPCConfigCommand.php @@ -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')) {