大重构

This commit is contained in:
2026-07-28 17:55:29 +08:00
parent d78dff5c8f
commit bde75af7c1
20 changed files with 1093 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
param(
[string]$Version = "",
[switch]$Force
)
$ErrorActionPreference = "Stop"
$arguments = @("install", "--id", "LLVM.LLVM", "--exact", "--silent", "--accept-package-agreements", "--accept-source-agreements", "--disable-interactivity")
if ($Version) {
$arguments += @("--version", $Version)
}
if ($Force) {
$arguments += "--force"
}
& winget @arguments
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
$clangTidy = "C:\Program Files\LLVM\bin\clang-tidy.exe"
if (!(Test-Path -LiteralPath $clangTidy)) {
throw "clang-tidy was not installed at $clangTidy"
}
& $clangTidy --version