add -lcompiler_rt to SPC_COMPILER_EXTRA instead

This commit is contained in:
henderkes
2026-04-17 14:17:39 +07:00
parent 1a395a2b0f
commit cc7a22922c
3 changed files with 9 additions and 3 deletions

View File

@@ -233,8 +233,7 @@ class Extension
if (preg_match('/^(.*_SHARED_LIBADD\s*=\s*)(.*)$/m', $makefileContent, $matches)) {
$prefix = $matches[1];
$currentLibs = trim($matches[2]);
$lzig = ToolchainManager::getToolchainClass() === ZigToolchain::class ? '-lcompiler_rt -lunwind' : '';
$newLibs = clean_spaces("{$currentLibs} {$staticLibs} {$lstdcpp} {$lzig}");
$newLibs = clean_spaces("{$currentLibs} {$staticLibs} {$lstdcpp}");
$deduplicatedLibs = deduplicate_flags($newLibs);
FileSystem::replaceFileRegex(