mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-02 14:25:41 +08:00
fix zig 0.16.0
This commit is contained in:
@@ -11,6 +11,8 @@ use SPC\exception\ValidationException;
|
||||
use SPC\exception\WrongUsageException;
|
||||
use SPC\store\Config;
|
||||
use SPC\store\FileSystem;
|
||||
use SPC\toolchain\ToolchainManager;
|
||||
use SPC\toolchain\ZigToolchain;
|
||||
use SPC\util\SPCConfigUtil;
|
||||
use SPC\util\SPCTarget;
|
||||
|
||||
@@ -231,7 +233,8 @@ class Extension
|
||||
if (preg_match('/^(.*_SHARED_LIBADD\s*=\s*)(.*)$/m', $makefileContent, $matches)) {
|
||||
$prefix = $matches[1];
|
||||
$currentLibs = trim($matches[2]);
|
||||
$newLibs = trim("{$currentLibs} {$staticLibs} {$lstdcpp}");
|
||||
$lzig = ToolchainManager::getToolchainClass() === ZigToolchain::class ? '-lcompiler_rt -lunwind' : '';
|
||||
$newLibs = clean_spaces("{$currentLibs} {$staticLibs} {$lstdcpp} {$lzig}");
|
||||
$deduplicatedLibs = deduplicate_flags($newLibs);
|
||||
|
||||
FileSystem::replaceFileRegex(
|
||||
|
||||
@@ -82,7 +82,6 @@ class Zig extends CustomPackage
|
||||
if (!$latest_version) {
|
||||
throw new DownloaderException('Could not determine latest Zig version');
|
||||
}
|
||||
$latest_version = '0.15.2';
|
||||
|
||||
logger()->info("Installing Zig version {$latest_version}");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user