Add PHP_BUILD_COMPILER for different toolchain

This commit is contained in:
crazywhalecc
2025-08-01 12:48:48 +08:00
parent 34edb6e329
commit 8b9b72958e
7 changed files with 59 additions and 2 deletions

View File

@@ -68,4 +68,10 @@ class ZigToolchain implements ToolchainInterface
GlobalEnvManager::putenv("SPC_EXTRA_LIBS={$extra_libs}");
}
}
public function getCompilerInfo(): ?string
{
$version = shell(false)->execWithResult('zig version', false)[1][0] ?? '';
return trim("zig {$version}");
}
}