Skip to content

Commit fad8f70

Browse files
committed
refactor(): use choco for llvm
Install llvm through chocolatey.
1 parent 63536ba commit fad8f70

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

WebKitDev/Functions/Install-LLVM.ps1

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,18 @@ function Install-LLVM {
2929
[string]$installationPath
3030
)
3131

32-
# Releases after 10.0 moved to GitHub
33-
$url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/LLVM-${version}-win64.exe"
34-
35-
$options = @('/S')
32+
$installerOptions = @()
3633

3734
if ($installationPath) {
38-
$options += "/D=$installationPath"
35+
Write-Warning 'The chocolatey package expects the standard location to be used';
36+
# NSIS installer will not accept " in the path even if there are spaces
37+
$installerOptions += ('/D={0}' -f $installationPath);
38+
Register-SystemPath (Join-Path $installationPath -ChildPath 'bin');
3939
}
4040

41-
Install-FromExe -Name 'LLVM' -url $url -Options $options -noVerify
41+
Install-FromChoco `
42+
-Name 'llvm' `
43+
-Version $version `
44+
-InstallerOptions $installerOptions `
45+
-VerifyExe 'clang-cl';
4246
}

0 commit comments

Comments
 (0)