From fad8f70d10b6d4f56674be78616592b3f5ce06f3 Mon Sep 17 00:00:00 2001 From: Don Olmstead Date: Tue, 7 Oct 2025 14:32:08 -0700 Subject: [PATCH] refactor(): use choco for llvm Install llvm through chocolatey. --- WebKitDev/Functions/Install-LLVM.ps1 | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/WebKitDev/Functions/Install-LLVM.ps1 b/WebKitDev/Functions/Install-LLVM.ps1 index da74810..33ab7bc 100755 --- a/WebKitDev/Functions/Install-LLVM.ps1 +++ b/WebKitDev/Functions/Install-LLVM.ps1 @@ -29,14 +29,18 @@ function Install-LLVM { [string]$installationPath ) - # Releases after 10.0 moved to GitHub - $url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/LLVM-${version}-win64.exe" - - $options = @('/S') + $installerOptions = @() if ($installationPath) { - $options += "/D=$installationPath" + Write-Warning 'The chocolatey package expects the standard location to be used'; + # NSIS installer will not accept " in the path even if there are spaces + $installerOptions += ('/D={0}' -f $installationPath); + Register-SystemPath (Join-Path $installationPath -ChildPath 'bin'); } - Install-FromExe -Name 'LLVM' -url $url -Options $options -noVerify + Install-FromChoco ` + -Name 'llvm' ` + -Version $version ` + -InstallerOptions $installerOptions ` + -VerifyExe 'clang-cl'; }