mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-12 11:25:35 +08:00
Compare commits
20 Commits
6b6025d3f0
...
e4201a28ca
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4201a28ca | ||
|
|
1b30c98fbd | ||
|
|
61747f6f4e | ||
|
|
c374163a05 | ||
|
|
ee21199ebb | ||
|
|
01607a06c9 | ||
|
|
fd4bf90a70 | ||
|
|
73bf9ff93f | ||
|
|
dcf1c5942c | ||
|
|
4695f846f5 | ||
|
|
37b5f89ee1 | ||
|
|
5e40982e85 | ||
|
|
1d1f58f3a1 | ||
|
|
be039802c0 | ||
|
|
5529e66a61 | ||
|
|
641ad8becf | ||
|
|
a19c4470bb | ||
|
|
143ae4b8c4 | ||
|
|
a980b0a1df | ||
|
|
a8a851659f |
@@ -1,5 +1,4 @@
|
||||
ncurses:
|
||||
binary: hosted
|
||||
metadata:
|
||||
license-files:
|
||||
- COPYING
|
||||
|
||||
@@ -348,6 +348,7 @@ ext-xmlreader:
|
||||
type: php-extension
|
||||
depends:
|
||||
- ext-xml
|
||||
- ext-dom
|
||||
php-extension:
|
||||
arg-type: enable
|
||||
build-with-php: true
|
||||
|
||||
@@ -5,7 +5,6 @@ brotli:
|
||||
type: ghtagtar
|
||||
repo: google/brotli
|
||||
match: 'v1\.\d.*'
|
||||
binary: hosted
|
||||
metadata:
|
||||
license-files: [LICENSE]
|
||||
license: MIT
|
||||
|
||||
@@ -8,7 +8,6 @@ bzip2:
|
||||
type: filelist
|
||||
url: 'https://sourceware.org/pub/bzip2/'
|
||||
regex: '/href="(?<file>bzip2-(?<version>[^"]+)\.tar\.gz)"/'
|
||||
binary: hosted
|
||||
metadata:
|
||||
license-files: ['@/bzip2.txt']
|
||||
license: bzip2-1.0.6
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
glfw:
|
||||
type: library
|
||||
artifact: glfw
|
||||
frameworks:
|
||||
- Cocoa
|
||||
- CoreFoundation
|
||||
- CoreVideo
|
||||
- IOKit
|
||||
- QuartzCore
|
||||
headers:
|
||||
- GLFW/glfw3.h
|
||||
- GLFW/glfw3native.h
|
||||
|
||||
@@ -10,7 +10,6 @@ libcares:
|
||||
type: filelist
|
||||
url: 'https://c-ares.org/download/'
|
||||
regex: '/href="\/download\/(?<file>c-ares-(?<version>[^"]+)\.tar\.gz)"/'
|
||||
binary: hosted
|
||||
metadata:
|
||||
license-files: [LICENSE.md]
|
||||
headers@unix:
|
||||
|
||||
@@ -5,7 +5,6 @@ libedit:
|
||||
type: filelist
|
||||
url: 'https://thrysoee.dk/editline/'
|
||||
regex: '/href="(?<file>libedit-(?<version>[^"]+)\.tar\.gz)"/'
|
||||
binary: hosted
|
||||
metadata:
|
||||
license-files: [COPYING]
|
||||
license: BSD-3-Clause
|
||||
|
||||
@@ -5,7 +5,6 @@ libiconv:
|
||||
type: filelist
|
||||
url: 'https://ftp.gnu.org/gnu/libiconv/'
|
||||
regex: '/href="(?<file>libiconv-(?<version>[^"]+)\.tar\.gz)"/'
|
||||
binary: hosted
|
||||
metadata:
|
||||
license-files: [COPYING.LIB]
|
||||
license: LGPL-2.0-or-later
|
||||
|
||||
@@ -6,7 +6,6 @@ libpng:
|
||||
repo: pnggroup/libpng
|
||||
match: v1\.6\.\d+
|
||||
query: '?per_page=150'
|
||||
binary: hosted
|
||||
metadata:
|
||||
license-files: [LICENSE]
|
||||
license: PNG
|
||||
|
||||
@@ -6,7 +6,6 @@ libsodium:
|
||||
repo: jedisct1/libsodium
|
||||
match: 'libsodium-(?!1\.0\.21)\d+(\.\d+)*\.tar\.gz'
|
||||
prefer-stable: true
|
||||
binary: hosted
|
||||
metadata:
|
||||
license-files: [LICENSE]
|
||||
pkg-configs:
|
||||
|
||||
@@ -6,7 +6,6 @@ libssh2:
|
||||
repo: libssh2/libssh2
|
||||
match: libssh2.+\.tar\.gz
|
||||
prefer-stable: true
|
||||
binary: hosted
|
||||
metadata:
|
||||
license-files: [COPYING]
|
||||
license: BSD-3-Clause
|
||||
|
||||
@@ -5,7 +5,6 @@ libunistring:
|
||||
type: filelist
|
||||
url: 'https://ftp.gnu.org/gnu/libunistring/'
|
||||
regex: '/href="(?<file>libunistring-(?<version>[^"]+)\.tar\.gz)"/'
|
||||
binary: hosted
|
||||
metadata:
|
||||
license-files: [COPYING.LIB]
|
||||
license: LGPL-3.0-or-later
|
||||
|
||||
@@ -10,7 +10,6 @@ openssl:
|
||||
type: filelist
|
||||
url: 'https://www.openssl.org/source/'
|
||||
regex: '/href="(?<file>openssl-(?<version>3\.[^"]+)\.tar\.gz)"/'
|
||||
binary: hosted
|
||||
metadata:
|
||||
license-files: [LICENSE.txt]
|
||||
license: OpenSSL
|
||||
|
||||
@@ -6,7 +6,6 @@ xz:
|
||||
repo: tukaani-project/xz
|
||||
match: xz.+\.tar\.xz
|
||||
prefer-stable: true
|
||||
binary: hosted
|
||||
metadata:
|
||||
license-files: [COPYING]
|
||||
license: 0BSD
|
||||
|
||||
@@ -5,7 +5,6 @@ zlib:
|
||||
type: ghrel
|
||||
repo: madler/zlib
|
||||
match: zlib.+\.tar\.gz
|
||||
binary: hosted
|
||||
metadata:
|
||||
license-files: ['@/zlib.txt']
|
||||
license: Zlib-Custom
|
||||
|
||||
@@ -19,3 +19,4 @@ zstd:
|
||||
- libzstd.a
|
||||
static-libs@windows:
|
||||
- zstd.lib
|
||||
- libzstd.lib
|
||||
|
||||
@@ -36,7 +36,7 @@ spc download [artifacts] [options]
|
||||
| `--binary-only` | | Only download binary artifacts |
|
||||
| `--parallel=<n>` | `-P` | Number of parallel downloads (default: `1`) |
|
||||
| `--retry=<n>` | `-R` | Number of retries on failure (default: `0`) |
|
||||
| `--ignore-cache=<list>` | | Force re-download the specified artifacts |
|
||||
| `--ignore-cache=<list>` | `-i` | Force re-download the specified artifacts |
|
||||
| `--no-alt` | | Do not use alternative mirror URLs |
|
||||
| `--no-shallow-clone` | | Do not clone git repositories shallowly |
|
||||
| `--custom-url=<src:url>` | `-U` | Override the download URL for a source |
|
||||
|
||||
@@ -22,23 +22,23 @@ spc download [artifacts] [options]
|
||||
|
||||
### 选项
|
||||
|
||||
| 选项 | 缩写 | 说明 |
|
||||
|---|---|---|
|
||||
| 选项 | 缩写 | 说明 |
|
||||
|---|------|---|
|
||||
| `--for-extensions=<list>` | `-e` | 按扩展名下载其所需的制品 |
|
||||
| `--for-libs=<list>` | `-l` | 按库名下载其所需的制品 |
|
||||
| `--for-packages=<list>` | | 按包名下载其所需的制品 |
|
||||
| `--without-suggests` | | 使用 `--for-extensions` 时跳过建议包 |
|
||||
| `--clean` | | 下载前删除旧的下载缓存 |
|
||||
| `--with-php=<ver>` | | PHP 版本,格式为 `major.minor`(默认 `8.4`)|
|
||||
| `--for-packages=<list>` | | 按包名下载其所需的制品 |
|
||||
| `--without-suggests` | | 使用 `--for-extensions` 时跳过建议包 |
|
||||
| `--clean` | | 下载前删除旧的下载缓存 |
|
||||
| `--with-php=<ver>` | | PHP 版本,格式为 `major.minor`(默认 `8.4`)|
|
||||
| `--prefer-binary` | `-p` | 优先使用预编译二进制 |
|
||||
| `--prefer-source` | | 优先使用源码包 |
|
||||
| `--source-only` | | 仅下载源码制品 |
|
||||
| `--binary-only` | | 仅下载二进制制品 |
|
||||
| `--prefer-source` | | 优先使用源码包 |
|
||||
| `--source-only` | | 仅下载源码制品 |
|
||||
| `--binary-only` | | 仅下载二进制制品 |
|
||||
| `--parallel=<n>` | `-P` | 并行下载数(默认 `1`)|
|
||||
| `--retry=<n>` | `-R` | 失败重试次数(默认 `0`)|
|
||||
| `--ignore-cache=<list>` | | 强制重新下载指定制品 |
|
||||
| `--no-alt` | | 不使用镜像站 |
|
||||
| `--no-shallow-clone` | | 不使用浅层克隆 |
|
||||
| `--ignore-cache=<list>` | `-i` | 强制重新下载指定制品 |
|
||||
| `--no-alt` | | 不使用镜像站 |
|
||||
| `--no-shallow-clone` | | 不使用浅层克隆 |
|
||||
| `--custom-url=<src:url>` | `-U` | 覆盖指定源的下载地址 |
|
||||
| `--custom-git=<src:branch:url>` | `-G` | 覆盖为自定义 git 仓库 |
|
||||
| `--custom-local=<src:path>` | `-L` | 使用本地路径作为制品来源 |
|
||||
|
||||
@@ -9,6 +9,7 @@ use StaticPHP\Attribute\Package\BeforeStage;
|
||||
use StaticPHP\Attribute\Package\CustomPhpConfigureArg;
|
||||
use StaticPHP\Attribute\Package\Extension;
|
||||
use StaticPHP\Attribute\Package\Validate;
|
||||
use StaticPHP\Attribute\PatchDescription;
|
||||
use StaticPHP\Exception\WrongUsageException;
|
||||
use StaticPHP\Package\PackageBuilder;
|
||||
use StaticPHP\Package\PackageInstaller;
|
||||
@@ -26,6 +27,19 @@ class imap extends PhpExtensionPackage
|
||||
}
|
||||
}
|
||||
|
||||
#[BeforeStage('php', [php::class, 'makeCliForUnix'], 'ext-imap')]
|
||||
#[PatchDescription('Fix imap zend_zval_value_name() call for PHP 8.2 compatibility')]
|
||||
public function patchBeforeMake(): void
|
||||
{
|
||||
// zend_zval_value_name() was introduced in PHP 8.3; PHP 8.2 imap backported the call but not the declaration
|
||||
// replace with the equivalent PHP 8.2-compatible function
|
||||
FileSystem::replaceFileStr(
|
||||
"{$this->getSourceDir()}/php_imap.c",
|
||||
'zend_zval_value_name(data)',
|
||||
'zend_zval_type_name(data)'
|
||||
);
|
||||
}
|
||||
|
||||
#[BeforeStage('php', [php::class, 'buildconfForUnix'], 'ext-imap')]
|
||||
public function patchBeforeBuildconf(PackageInstaller $installer): void
|
||||
{
|
||||
|
||||
@@ -17,6 +17,20 @@ class memcache extends PhpExtensionPackage
|
||||
#[BeforeStage('php', [php::class, 'buildconfForUnix'], 'ext-memcache')]
|
||||
public function patchBeforeBuildconf(): bool
|
||||
{
|
||||
// PHP 8.5 moved php_smart_string*.h from ext/standard/ to Zend/
|
||||
foreach (['src/memcache_pool.h', 'src/memcache_pool.c', 'src/memcache_session.c', 'src/memcache_ascii_protocol.c', 'src/memcache_binary_protocol.c'] as $file) {
|
||||
FileSystem::replaceFileStr(
|
||||
"{$this->getSourceDir()}/{$file}",
|
||||
'#include "ext/standard/php_smart_string_public.h"',
|
||||
'#include "Zend/zend_smart_string_public.h"',
|
||||
);
|
||||
FileSystem::replaceFileStr(
|
||||
"{$this->getSourceDir()}/{$file}",
|
||||
'#include "ext/standard/php_smart_string.h"',
|
||||
'#include "Zend/zend_smart_string.h"',
|
||||
);
|
||||
}
|
||||
|
||||
if (!$this->isBuildStatic()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -8,15 +8,16 @@ use Package\Target\php;
|
||||
use StaticPHP\Attribute\Package\CustomPhpConfigureArg;
|
||||
use StaticPHP\Attribute\Package\Extension;
|
||||
use StaticPHP\Package\PackageBuilder;
|
||||
use StaticPHP\Package\PackageInstaller;
|
||||
|
||||
#[Extension('zlib')]
|
||||
class zlib
|
||||
{
|
||||
#[CustomPhpConfigureArg('Darwin')]
|
||||
#[CustomPhpConfigureArg('Linux')]
|
||||
public function unixConfigureArg(PackageBuilder $builder): string
|
||||
public function unixConfigureArg(PackageBuilder $builder, PackageInstaller $installer): string
|
||||
{
|
||||
$zlib_dir = php::getPHPVersionID() >= 80400 ? '' : ' --with-zlib-dir=' . $builder->getBuildRootPath();
|
||||
return '--with-zlib' . $zlib_dir;
|
||||
$zlib_dir = (php::getPHPVersionID() >= 80400 && !$installer->getPhpExtensionPackage('spx')) ? '' : " --with-zlib-dir={$builder->getBuildRootPath()}";
|
||||
return "--with-zlib{$zlib_dir}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ class mpir
|
||||
{
|
||||
$vs_ver_dir = ApplicationContext::get('mpir_vs_ver_dir');
|
||||
cmd()->cd("{$lib->getSourceDir()}{$vs_ver_dir}\\lib_mpir_gc")
|
||||
->exec('msbuild lib_mpir_gc.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x64');
|
||||
->exec('msbuild lib_mpir_gc.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x64 /p:WindowsTargetPlatformVersion=10.0');
|
||||
FileSystem::createDir($lib->getLibDir());
|
||||
FileSystem::createDir($lib->getIncludeDir());
|
||||
FileSystem::copy("{$lib->getSourceDir()}{$vs_ver_dir}\\lib_mpir_gc\\x64\\Release\\mpir_a.lib", "{$lib->getLibDir()}\\mpir_a.lib");
|
||||
|
||||
@@ -26,6 +26,7 @@ class zstd
|
||||
)
|
||||
->build();
|
||||
FileSystem::copy($package->getLibDir() . '\zstd_static.lib', $package->getLibDir() . '/zstd.lib');
|
||||
FileSystem::copy($package->getLibDir() . '\zstd_static.lib', $package->getLibDir() . '/libzstd.lib');
|
||||
}
|
||||
|
||||
#[BuildFor('Linux')]
|
||||
|
||||
@@ -48,6 +48,7 @@ class DownloaderOptions
|
||||
$shortU = $prefix ? null : 'U';
|
||||
$shortG = $prefix ? null : 'G';
|
||||
$shortL = $prefix ? null : 'L';
|
||||
$shortI = $prefix ? null : 'i';
|
||||
|
||||
return [
|
||||
// php version option
|
||||
@@ -62,7 +63,7 @@ class DownloaderOptions
|
||||
// download behavior options
|
||||
new InputOption("{$p}parallel", $shortP, InputOption::VALUE_REQUIRED, 'Number of parallel downloads (default 1)', '1'),
|
||||
new InputOption("{$p}retry", $shortR, InputOption::VALUE_REQUIRED, 'Number of download retries on failure (default 0)', '0'),
|
||||
new InputOption("{$p}ignore-cache", null, InputOption::VALUE_OPTIONAL, 'Ignore some caches when downloading, comma separated, e.g "php-src,curl,openssl"', false),
|
||||
new InputOption("{$p}ignore-cache", $shortI, InputOption::VALUE_OPTIONAL, 'Ignore some caches when downloading, comma separated, e.g "php-src,curl,openssl"', false),
|
||||
new InputOption("{$p}no-alt", null, null, 'Do not use alternative mirror download artifacts for sources'),
|
||||
new InputOption("{$p}no-shallow-clone", null, null, 'Do not clone shallowly repositories when downloading sources'),
|
||||
|
||||
|
||||
@@ -11,11 +11,46 @@ use Symfony\Component\Console\Attribute\AsCommand;
|
||||
#[AsCommand('dev:gen-ext-test-matrix', 'Generate GitHub Actions extension test matrix JSON', [], true)]
|
||||
class GenExtTestMatrixCommand extends BaseCommand
|
||||
{
|
||||
private const BUILD_TARGETS = '--build-cli --build-cgi --build-micro --dl-parallel=10';
|
||||
private const string BUILD_TARGETS = '--build-cli --build-cgi --build-micro';
|
||||
|
||||
private const OS_RUNNERS = [
|
||||
private const array OS_RUNNERS = [
|
||||
'linux' => ['arch' => 'x86_64', 'runner' => 'ubuntu-latest', 'os_key' => 'Linux'],
|
||||
'windows' => ['arch' => 'x86_64', 'runner' => 'windows-2025', 'os_key' => 'Windows'],
|
||||
'windows' => ['arch' => 'x86_64', 'runner' => 'windows-latest', 'os_key' => 'Windows'],
|
||||
'macos' => ['arch' => 'aarch64', 'runner' => 'macos-15', 'os_key' => 'Darwin'],
|
||||
];
|
||||
|
||||
/**
|
||||
* Extensions excluded from specific OS matrix entries.
|
||||
*/
|
||||
private const array OS_EXCLUDE = [
|
||||
'linux' => ['glfw'],
|
||||
];
|
||||
|
||||
/**
|
||||
* Extra build flags appended when a matrix entry contains any of the listed extensions.
|
||||
* Key: extension display name (without ext- prefix). Value: extra flags string.
|
||||
*/
|
||||
private const array EXTRA_BUILD_FLAGS = [
|
||||
'parallel' => '--enable-zts',
|
||||
];
|
||||
|
||||
/**
|
||||
* Pairs of extensions that cannot be built together in the same matrix entry.
|
||||
*/
|
||||
private const array CONFLICTS = [
|
||||
['grpc', 'protobuf'],
|
||||
['swow', 'swoole'],
|
||||
];
|
||||
|
||||
/**
|
||||
* Extensions that must always appear alone in their own matrix entry.
|
||||
* Use display names (without ext- prefix).
|
||||
*/
|
||||
private const array STANDALONE = [
|
||||
'grpc',
|
||||
'glfw',
|
||||
'imagick',
|
||||
'intl',
|
||||
];
|
||||
|
||||
protected bool $no_motd = true;
|
||||
@@ -52,8 +87,9 @@ class GenExtTestMatrixCommand extends BaseCommand
|
||||
$os_key = $os_info['os_key'];
|
||||
|
||||
// Filter by OS support
|
||||
$os_regular = array_filter($all_regular, fn ($c) => $this->supportsOS($c, $os_key));
|
||||
$os_virtual = array_filter($all_virtual, fn ($c) => $this->supportsOS($c, $os_key));
|
||||
$os_exclude = array_fill_keys(array_map(fn ($n) => 'ext-' . $n, self::OS_EXCLUDE[$os] ?? []), true);
|
||||
$os_regular = array_filter($all_regular, fn ($c, $k) => $this->supportsOS($c, $os_key) && !isset($os_exclude[$k]), ARRAY_FILTER_USE_BOTH);
|
||||
$os_virtual = array_filter($all_virtual, fn ($c, $k) => $this->supportsOS($c, $os_key) && !isset($os_exclude[$k]), ARRAY_FILTER_USE_BOTH);
|
||||
|
||||
// Pool: all ext-* names available on this OS (regular + virtual)
|
||||
$pool_set = array_fill_keys(
|
||||
@@ -99,33 +135,41 @@ class GenExtTestMatrixCommand extends BaseCommand
|
||||
$covered = [];
|
||||
$groups = [];
|
||||
$orphans = [];
|
||||
$standalone_set = array_fill_keys(self::STANDALONE, true);
|
||||
|
||||
foreach (array_merge($roots, $non_roots) as $ext) {
|
||||
if (isset($covered[$ext])) {
|
||||
continue;
|
||||
}
|
||||
$chain = $this->dfsCollect($ext, $ext_deps, $pool_set, $covered);
|
||||
if (count($chain) === 1 && empty($ext_deps[$ext])) {
|
||||
$orphans[] = $this->displayName($ext);
|
||||
$display = $this->displayName($ext);
|
||||
if (isset($standalone_set[$display])) {
|
||||
// Always emit standalone extensions as their own single entry
|
||||
$groups[] = $display;
|
||||
} elseif (count($chain) === 1 && empty($ext_deps[$ext])) {
|
||||
$orphans[] = $display;
|
||||
} else {
|
||||
$groups[] = implode(',', array_map($this->displayName(...), $chain));
|
||||
}
|
||||
}
|
||||
|
||||
// All orphans become a single batched matrix entry
|
||||
// Batch orphans, splitting conflicting extensions into separate entries
|
||||
if (!empty($orphans)) {
|
||||
sort($orphans);
|
||||
$groups[] = implode(',', $orphans);
|
||||
foreach ($this->splitOrphansByConflicts($orphans) as $batch) {
|
||||
$groups[] = implode(',', $batch);
|
||||
}
|
||||
}
|
||||
|
||||
sort($groups);
|
||||
foreach ($groups as $group) {
|
||||
$extra = $this->extraBuildFlags($group);
|
||||
$entries[] = [
|
||||
'runner' => $os_info['runner'],
|
||||
'os' => $os,
|
||||
'arch' => $os_info['arch'],
|
||||
'extension' => $group,
|
||||
'build-args' => '"' . $group . '" ' . self::BUILD_TARGETS,
|
||||
'build-args' => '"' . $group . '" ' . self::BUILD_TARGETS . ($extra !== '' ? ' ' . $extra : ''),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -164,6 +208,62 @@ class GenExtTestMatrixCommand extends BaseCommand
|
||||
return str_starts_with($pkg_name, 'ext-') ? substr($pkg_name, 4) : $pkg_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Split orphans into batches such that no two conflicting extensions share a batch.
|
||||
* Uses a greedy graph-coloring approach.
|
||||
*
|
||||
* @param string[] $orphans display names, pre-sorted
|
||||
* @return string[][] array of batches, each batch is an array of display names
|
||||
*/
|
||||
private function splitOrphansByConflicts(array $orphans): array
|
||||
{
|
||||
$adjacency = [];
|
||||
foreach (self::CONFLICTS as [$a, $b]) {
|
||||
$adjacency[$a][$b] = true;
|
||||
$adjacency[$b][$a] = true;
|
||||
}
|
||||
|
||||
$batches = [];
|
||||
foreach ($orphans as $ext) {
|
||||
$placed = false;
|
||||
foreach ($batches as &$batch) {
|
||||
$conflict = false;
|
||||
foreach ($batch as $member) {
|
||||
if (isset($adjacency[$ext][$member])) {
|
||||
$conflict = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$conflict) {
|
||||
$batch[] = $ext;
|
||||
$placed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
unset($batch);
|
||||
if (!$placed) {
|
||||
$batches[] = [$ext];
|
||||
}
|
||||
}
|
||||
return $batches;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns any extra build flags required for an extension group string.
|
||||
* Checks whether any extension in the comma-separated group matches EXTRA_BUILD_FLAGS.
|
||||
*/
|
||||
private function extraBuildFlags(string $group): string
|
||||
{
|
||||
$names = explode(',', $group);
|
||||
$flags = [];
|
||||
foreach (self::EXTRA_BUILD_FLAGS as $ext => $extra) {
|
||||
if (in_array($ext, $names, true)) {
|
||||
$flags[] = $extra;
|
||||
}
|
||||
}
|
||||
return implode(' ', $flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve the value of a platform-specific array field, applying the suffix fallback chain.
|
||||
*
|
||||
|
||||
@@ -230,7 +230,7 @@ class UnixCMakeExecutor extends Executor
|
||||
|
||||
// EXE linker flags: base system libs + framework flags for target packages
|
||||
$exeLinkerFlags = SystemTarget::getRuntimeLibs();
|
||||
if ($this->package instanceof TargetPackage) {
|
||||
if ($this->package instanceof TargetPackage && SystemTarget::getTargetOS() === 'Darwin') {
|
||||
$resolvedNames = array_keys($this->installer->getResolvedPackages());
|
||||
$resolvedNames[] = $this->package->getName();
|
||||
$fwFlags = new SPCConfigUtil()->getFrameworksString($resolvedNames);
|
||||
|
||||
Reference in New Issue
Block a user