mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-04 23:35:40 +08:00
getcctype default
This commit is contained in:
@@ -78,8 +78,9 @@ class SystemUtil
|
||||
/**
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
public static function getCCType(string $cc): string
|
||||
public static function getCCType(?string $cc = null): string
|
||||
{
|
||||
$cc ??= getenv('CC');
|
||||
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',
|
||||
|
||||
Reference in New Issue
Block a user