From 84597546929b3f5d56fb4801612764ed6ae216c6 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 25 Mar 2025 13:29:55 +0800 Subject: [PATCH] Change to --enable-shared --disable-static --- src/SPC/builder/Extension.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/SPC/builder/Extension.php b/src/SPC/builder/Extension.php index 1ba396a7..7091aaf1 100644 --- a/src/SPC/builder/Extension.php +++ b/src/SPC/builder/Extension.php @@ -254,6 +254,12 @@ class Extension // do nothing, just throw wrong usage exception if not valid } + /** + * Build shared extension + * + * @throws WrongUsageException + * @throws RuntimeException + */ public function buildShared(): void { match (PHP_OS_FAMILY) { @@ -262,13 +268,18 @@ class Extension }; } + /** + * Build shared extension for Unix + * + * @throws RuntimeException + */ public function buildUnixShared(): void { // prepare configure args shell()->cd($this->source_dir) ->setEnv(['CFLAGS' => $this->builder->arch_c_flags ?? '']) ->execWithEnv(BUILD_BIN_PATH . '/phpize') - ->execWithEnv('./configure ' . $this->getUnixConfigureArg() . ' --with-php-config=' . BUILD_BIN_PATH . '/php-config --enable-static --disable-shared') + ->execWithEnv('./configure ' . $this->getUnixConfigureArg() . ' --with-php-config=' . BUILD_BIN_PATH . '/php-config --enable-shared --disable-static') ->execWithEnv('make clean') ->execWithEnv('make -j' . $this->builder->concurrency);