mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
also make sure clang version uses dots
This commit is contained in:
parent
2ed8bbf391
commit
df60ccff0e
@ -45,7 +45,7 @@ class ClangNativeToolchain implements ToolchainInterface
|
||||
$compiler = getenv('CC') ?: 'clang';
|
||||
$version = shell(false)->execWithResult("{$compiler} --version", false);
|
||||
$head = pathinfo($compiler, PATHINFO_BASENAME);
|
||||
if ($version[0] === 0 && preg_match('/clang version (\d+.\d+.\d+)/', $version[1][0], $match)) {
|
||||
if ($version[0] === 0 && preg_match('/clang version (\d+\.\d+\.\d+)/', $version[1][0], $match)) {
|
||||
return "{$head} {$match[1]}";
|
||||
}
|
||||
return $head;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user