diff --git a/src/SPC/builder/unix/UnixBuilderBase.php b/src/SPC/builder/unix/UnixBuilderBase.php index a82be71c..dba5ca11 100644 --- a/src/SPC/builder/unix/UnixBuilderBase.php +++ b/src/SPC/builder/unix/UnixBuilderBase.php @@ -338,6 +338,8 @@ abstract class UnixBuilderBase extends BuilderBase } $config = (new SPCConfigUtil($this))->config($this->ext_list, $this->lib_list, with_dependencies: true); + $libphp = getenv('SPC_CMD_VAR_PHP_EMBED_TYPE') === 'shared' ? 'libphp.so' : 'libphp.a'; + $config['libs'] = str_replace('-lphp', BUILD_LIB_PATH . '/' . $libphp, $config['libs']); $env = [ 'CGO_ENABLED' => '1', diff --git a/src/SPC/util/SPCTarget.php b/src/SPC/util/SPCTarget.php index e87368d0..583fa757 100644 --- a/src/SPC/util/SPCTarget.php +++ b/src/SPC/util/SPCTarget.php @@ -43,7 +43,7 @@ class SPCTarget return false; } if (str_contains($target, '-musl')) { - return false; + return true; } if (PHP_OS_FAMILY === 'Linux') { return SystemUtil::isMuslDist();