zig is clang

This commit is contained in:
DubbleClick
2025-06-23 15:26:39 +07:00
parent f9af24e246
commit bd863dba34
2 changed files with 25 additions and 20 deletions

View File

@@ -81,6 +81,7 @@ class SystemUtil
public static function getCCType(string $cc): string
{
return match (true) {
str_contains($cc, 'zig') => 'clang',
str_ends_with($cc, 'c++'), str_ends_with($cc, 'cc'), str_ends_with($cc, 'g++'), str_ends_with($cc, 'gcc') => 'gcc',
$cc === 'clang++', $cc === 'clang', str_starts_with($cc, 'musl-clang') => 'clang',
default => throw new RuntimeException("unknown cc type: {$cc}"),